GROUP_CONCAT equivalence in Oracle
Hello All, I have this table from the MySQL Database and willing to transform it in Oracle. How can I go about it? I am supporting developers who need it to move ahead. Thanks for any input.
SELECT * FROM ( SELECT a.employee_id , a.emp_firstname ,
a.emp_lastname , a.emp_middle_name , LPAD(a.emp_number, 4, 0) , a.work_station ,
c.jobtit_name , CONCAT(CONCAT(a.emp_firstname, ' '), a.emp_middle_name) || CONCAT(' ', a.emp_lastname) ,
d.title , e.estat_name , GROUP_CONCAT(g.emp_firstname, ' ', g.emp_lastname ORDER BY
erep_reporting_mode ) AS Supervisor FROM ( ( ( ( ( hs_hr_employee a LEFT JOIN hs_hr_job_title
c ON ( a.job_title_code = c.jobtit_code ) ) LEFT JOIN hs_hr_compstructtree d ON
( a.work_station = d.id ) ) LEFT JOIN hs_hr_empstat e ON ( a.emp_status =
e.estat_code ) ) LEFT JOIN hs_hr_emp_reportto f ON ( a.emp_number =
f.erep_sub_emp_number ) ) LEFT JOIN hs_hr_employee g ON ( f.erep_sup_emp_number =
g.emp_number ) ) WHERE (a.emp_status != 'EST000' OR a.emp_status IS NULL) GROUP BY
a.emp_number ORDER BY a.employee_id ASC) AS subsel where a.employee_id between 0 and 50;
Regards,
Please, I have got some more info on the aggregation here. The main problem is that what I have seen so far aggregate data from 2 tables which don't have any common column and the comparison on the retrieval is made through the equality between 2 columns from 1 table and 1 column from the other table. Please, I will be waiting for your reply and some suggestions on this.
Kind Regards,
Similar Messages
-
Equivalence in Oracle of user-defined variables in mysql
Hi,
Due to the convertion of the backend database of an application from mysql to oracle 10g, I need also to convert my sql query for a BIRT report to be compatible to Oracle 10g.
It is about the usage of user-defined variables in mysql. What is the equivalence in oracle of the user-defined variables in mysql for the following listed case?
Thanks much in advance!
LBäcker
SQL for Mysql was something like this:
select ID1,ID2, case when ( SORT is not null )
then @SA := SORT else @SA := @SA + 1 end as S1 ,
case when ( SORT2 is not null ) then @SB := SORT2 else @SB := @SB + 1 end as S2
from
( select @SA := 100 , ID ID1, GLOBALSORTORDER SORT, ORG ORG1
from DOCUMENT where ACTIVE = 'T' and BASELINE = 4 ) b1
FULL OUTER JOIN
( select @SB := 200 , ID ID2, GLOBALSORTORDER SORT2, ORG ORG2
from dOCUMENT where ACTIVE = 'T' and BASELINE = 5 ) b2
on b1.ORG1 = b2.ORG2
ORDER BY S2, S1
The purpose I wrote this sql code is to resolve a sorting problem
b1
ID | Globalsortorder | org |
23 | 100 | 10
24| 101 | 11
b2
ID | Globalsortorder | org |
38| 200 | 9
39 | 201 | 10
34| 202 | 12
expected result
ID1 | ID2 | S1 | S2
null | 38 | 100 | 200
23 | 39 | 100 | 201
24 | null | 101 | 202
null |34 | 102 | 202Hello
It is entirely possible I've missed something but does this not do what you need it to?
WITH baseline AS
SELECT 1 Baseline, 23 ORG, '2.1' SEQ, 200 so, 300 Item_Id FROM dual UNION ALL
SELECT 1 Baseline, 25 ORG , '2.1.1' SEQ, 201 so, 305 Item_Id FROM dual UNION ALL
SELECT 1 Baseline, 26 ORG, '2.2' SEQ, 202 so, 403 Item_Id FROM dual UNION ALL
SELECT 2 Baseline, 22 ORG, '12.3' SEQ, 300 so, 323 Item_Id FROM dual UNION ALL
SELECT 2 Baseline, 23 ORG, '12.3.1' SEQ, 301 so,3423 Item_Id FROM dual UNION ALL
SELECT 2 Baseline, 24 ORG , '12.3.1.1' SEQ, 302 so,2534 Item_Id FROM dual UNION ALL
SELECT 2 Baseline, 25 ORG , '12.3.1.2' SEQ, 304 so,3242 Item_Id FROM dual
SELECT
bl.*,
bl2.*
FROM
( SELECT
FROM
baseline bl
WHERE
baseline = 1
) bl
FULL OUTER JOIN
( SELECT
FROM
baseline bl
WHERE
baseline = 2
) bl2
ON(bl.org = bl2.org)
ORDER BY
bl2.so,bl.so
BASELINE ORG SEQ SO ITEM_ID BASELINE ORG SEQ SO ITEM_ID
2 22 12.3 300 323
1 23 2.1 200 300 2 23 12.3.1 301 3423
2 24 12.3.1.1 302 2534
1 25 2.1.1 201 305 2 25 12.3.1.2 304 3242
1 26 2.2 202 403
5 rows selected.Also, when you post data or sql statements, it helps readibility if you type {noformat}{noformat} before and after your code or data to preserve the formatting as above.
HTH
David -
Equivalence Operator - Oracle Text Search
Hi,
I am trying to use Equivalence Operator(=) as following,
SELECT SCORE (1), CLOB_COL
FROM TEST_CLOB
+WHERE CONTAINS (CLOB_COL, '({AIR}={WA@TER})', 1) > 0+
This seems to work fine for normal words, but when the word has any special characters(WA@TER) the equivalence operator throws the following error.
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50921: EQUIV operand not a word or another EQUIV expression
DRG-50921: EQUIV operand not a word or another EQUIV expression
Please let me know if there is a way to escape the special characters.
The same query seem to work if i use "OR" operator instead of "Equivalence" but need to know whether it is possible to do it with "Equivalence" operator.
Thanks.865045 wrote:
Hi,
I am trying to use Equivalence Operator(=) as following,
SELECT SCORE (1), CLOB_COL
FROM TEST_CLOB
+WHERE CONTAINS (CLOB_COL, '({AIR}={WA@TER})', 1) > 0+
This seems to work fine for normal words, but when the word has any special characters(WA@TER) the equivalence operator throws the following error.
ORA-29902: error in executing ODCIIndexStart() routine
ORA-20000: Oracle Text error:
DRG-50921: EQUIV operand not a word or another EQUIV expression
DRG-50921: EQUIV operand not a word or another EQUIV expression
Please let me know if there is a way to escape the special characters.
The same query seem to work if i use "OR" operator instead of "Equivalence" but need to know whether it is possible to do it with "Equivalence" operator.
Thanks.The second result in a simple google query for "oracle text escape special characters" returned this.
http://download.oracle.com/docs/cd/B28359_01/text.111/b28304/cqspcl.htm
Please keep google (and the Oracle documentation itself) in mind in the future, it's faster for you and less pollution to the forums for simple document reference questions like this. -
SQL*LOADER/SQL usage in Migration
I have very limited migration requirements. I DO NOT need to
migrate a database. I DO need to change some SQL and BCP load
scripts from SQL-SERVER 6.5 to their equivalents in ORACLE 8.0.5.
For this limited purpose, should I proceed to handcode these, or
would the workbench be of use to me?
Thanks for your help.
nullThe migration workbench does, as part of the migration,
generate the BCP and SQL*Loader files required to migrate a
database. However, since you already have the BCP files created
then the Workbench would not actually be able to just generate
the other side of the picture (the SQL*Loader files). I can
suggest the following to you :
1. Perhaps use the Workbench to run a tiny migration that would
show you how we generate the SQL*Loader scripts. It is fairly
straight forward however we need to do some manipulation on
dates.
2. There is a chapter on SQL*Loader as part of the Oracle8i
documentation set.
Chapter 3 "SQL*Loader Concepts"
Oracle8i Utilities, Release 8.1.5
A67792-01
Regards,
Marie
Raja Marla (guest) wrote:
: I have very limited migration requirements. I DO NOT need to
: migrate a database. I DO need to change some SQL and BCP
load
: scripts from SQL-SERVER 6.5 to their equivalents in ORACLE
8.0.5.
: For this limited purpose, should I proceed to handcode these,
or
: would the workbench be of use to me?
: Thanks for your help.
Oracle Technology Network
http://technet.oracle.com
null -
What I would like jdeveloper be like
Feedback to Oracle.
I had seen Oracle is investing a lot of time to improve jdeveloper and create THE development tool.
But in more than a decade of developing, I never had seen something so easy and flexible to use than visual fox pro, visual basic never were near to it.
And I really would like to find that funcionality in another product.
One example you could create and object navigator and add it to any other form, you coud add properties to configure the encapsualted object, i.e table name, and that properties was set on the form where it was inherited.
and you could enter that object navigator in the form, and replace or call the native trigger using something like this.
It was very easy and nice, specially intuitive. Jdeveloper is an excellent tool for java, but I still don't find the most important funcionality, not all the funcionality, I could find in oracle forms.
The principal reason to talk about this is because I still don't see jdeveloper too easy to develop, as I expected, and I think if Oracle want to create the easiest product to use, Oracle should think in easier ways to encapsulate objects and other funcionality.
I still complaint about the fault of exampled in the documentation of their framework, adf, and this is not only me, is a mistery to find equivalents from oracle forms, in jdeveloper, even all this years; and this is not only me, there are other people who has the same problem.
jdeveloper is an excellent product, but I think in the future an easier product will replace it, is the best on java, but I think what we need is the easiest product to learn and use.
:)Thanks for your help.
My range size is 10.
But I have a question, vo.last does the same that the last button (navigation bar) on a jsp page?
For example, if I have navigated through 50 records (with nextSet button) and I press last button, and I know that the query result in the view object is 1000 records, but I'm using RANGE_PAGING, how can I go to the last record?
Because I tried with last button, but it goes to other record different to the last one.
Thanks in advance. -
Error installing clusterware 10gR2 with OCFS2 Storage
When i ran OUI to install clusterware, i get this error when i specified storage location to OCR as '/dev/sda4' -> The location /dev/sda4, entered for the Oracle Cluster Registry (OCR) is not shared across all the nodes in the cluster. Specify a shared raw partition or cluster file system file that is visible by the same name on all nodes of the cluster."
i have been checked the OCFS2 configuration based on technical doc from project site
Thanks in advanceOCFS2 as follow
/dev/sda1 ocfs2 10008448 503392 9505056 6% /app/oracle
/dev/sda2 ocfs2 10008480 1966304 8042176 20% /dbs/genccpr1/ARCHIVE_BACKUP
/dev/sda3 ocfs2 10008480 137632 9870848 2% /dbs/genccpr1/ARCHIVE_LOG
/dev/sda4 ocfs2 3526240 153216 3373024 5% /app/oracle/crs
Shared in both nodes
$ sh comp ssa -n dbgs1c01,dbgs2c01 -s /dev/sda1,/dev/sda2,/dev/sda3,/dev/sda4 <
Verifying shared storage accessibility
Checking shared storage accessibility...
"/dev/sda1" is shared.
"/dev/sda2" is shared.
"/dev/sda3" is shared.
"/dev/sda4" is shared.
Shared storage check was successful on nodes "dbgs1c01,dbgs2c01".
Verification of shared storage accessibility was successful.
$
SSH and host equivalence
$ /app/oracle/clusterware/cluvfy/runcluvfy.sh stage -pre crsinst -n dbgs1c01,dbgs2c01
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "dbgs1c01".
Checking user equivalence...
User equivalence check passed for user "oracle".
Checking administrative privileges...
User existence check passed for "oracle".
Group existence check passed for "oinstall".
Membership check for user "oracle" in group "oinstall" [as Primary] passed.
Administrative privileges check passed.
Checking node connectivity...
Node connectivity check passed for subnet "172.16.52.0" with node(s) dbgs1c01,dbgs2c01.
Node connectivity check passed for subnet "10.0.0.0" with node(s) dbgs1c01,dbgs2c01.
Suitable interfaces for the private interconnect on subnet "172.16.52.0":
dbgs1c01 eth0:172.16.52.124
dbgs2c01 eth0:172.16.52.125
Suitable interfaces for the private interconnect on subnet "10.0.0.0":
dbgs1c01 eth1:10.0.0.1
dbgs2c01 eth1:10.0.0.2
ERROR:
Could not find a suitable set of interfaces for VIPs. <--- Ref Metalink Doc. 338924.1
Node connectivity check failed.
Checking system requirements for 'crs'...
No checks registered for this product.
Pre-check for cluster services setup was unsuccessful on all the nodes.
$
Permissions
$ ls -ltr /dev/sda4
brw-rw---- 1 root dba 8, 4 Jul 4 19:03 /dev/sda4
Regards,
Edited by: Jamb on Jul 9, 2009 3:08 PM -
Equivalent of dbaccess and dbschema in Informix
Could somebody tell me what's the equivalent of dbaccess and dbschema in Informix. dbaccess runs on Unix terminal and gives good view of tables, indexes, constraints etc. It also tells all the databases on the local or remote server.
dbschema dumps the schema of table or entire database.dbaccess oracle's equivalent is sqlplus.........and dbschema oracle's equivalent is sqlplus too.
I mean that it's no one-to-one fixed equivalents in oracle to theses informix tools, but in oracle with sqlplus you can do everything you need.. but sometimes it's too hard, then the best choice if you don't are skilful with sqlplus, is using graphical tools instead of commando line tools like sqldeveloper. -
Result: User equivalence check failed for user "oracle".
While installing on Solaris-10, ssh, rlogin, scp works fine.
Running runcluvfy.sh stage -post hwos -n rac-1,rac-2 -verbose returns the above error.
Result: User equivalence check failed for user "oracle".
ERROR:
User equivalence unavailable on all the nodes.
Verification cannot proceed.
/bin/ssh & /bin/scp is in use.Hello,
I am facing User equivalence check failed for user "oracle" error on my newly to be built RAC cluster.
The Oracle users have been created identically and ssh have been setup as per RAC installation manual.
Still I am facing the below problem. Please help me out
Node1 > uname -a
Linux purple-rac-node2 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Node2 > uname -a
Linux purple-rac-node1 2.6.18-194.el5 #1 SMP Mon Mar 29 22:10:29 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
clusterware/cluvfy/runcluvfy.sh stage -post hwos -n purple-rac-node1,purple-rac-node2 -verbose
Performing post-checks for hardware and operating system setup
Checking node reachability...
Check: Node reachability from node "purple-rac-node1"
Destination Node Reachable?
purple-rac-node2 yes
purple-rac-node1 yes
Result: Node reachability check passed from node "purple-rac-node1".
Checking user equivalence...
Check: User equivalence for user "oracle"
Node Name Comment
purple-rac-node2 failed
purple-rac-node1 failed
Result: User equivalence check failed for user "oracle".
ERROR:
User equivalence unavailable on all the nodes.
Verification cannot proceed.
[oracle@purple-rac-node1 ~]$ id oracle
uid=501(oracle) gid=501(dba) groups=501(dba),502(oper),503(oinstall)
[oracle@purple-rac-node2 ~]$ id oracle
uid=501(oracle) gid=501(dba) groups=501(dba),502(oper),503(oinstall) -
Runcluvfy.sh failed on user equivalence check for user "oracle"
I have user oracle set up on both nodes -RHEL5 as:
uid=505(oracle) gid=87(oinstall) groups=87(oinstall),88(dba)
but when run the runcluvfy.sh stage -pre crsinst -n node1,node2 -verbose
get the ERROR:
user equivalence check failed for user "oracle"
user equivalence unavailable on all the nodes.
Help appreciated!When you test this, are you using the fully qualified domain name (FQDN) like node1.domain.com or just node1? Oracle is most likely using the FQDN, so if you did "ssh node1 date" and that worked fine, I'll bet that "ssh node1.domain.com date" will result in a prompt to authorize the host first and that's probably the issue.
I also usually ssh over the private interface as well. That is, do both of these from the node where the installer runs:
ssh node2.domain.com date
ssh node2-priv.domain.com date ### assuming that node2-priv is the name of the private network interface
Let us know if that's the issue.
Dan -
Result: PRVF-4007 : User equivalence check failed for user "oracle"
Hi
I get below error everytime I run ./cluvfy stage -pre crsinst -n node01,node02 -fixup -verbose > a.log
Checking user equivalence...
Check: User equivalence for user "oracle"
Node Name Comment
node02 passed
node01 failed
Result: PRVF-4007 : User equivalence check failed for user "oracle"
WARNING:
User equivalence is not set for nodes:
node01
Verification will proceed with nodes:
node02
node01 is the local node, if I run from node02 It comes back saying the same thing about node2!
I have checked oracle uid and groups all set correctly and ssh working fine ...
I have ran the same command for grid user and getting the same error !!i know what it was, i should have done ssh localnode date for once at least!!
I only did ssh remotenode date :) -
User equivalence check failed for user "oracle".
Hi,
I am trying to install the Oracle Clusterware 10g as part of my RAC setup.
I have configured RHEL 4 in 2 nodes (rac and rac2). But when I run the runcluvfy utility, I get the below error:
[oracle@rac cluvfy]$ ./runcluvfy.sh stage -pre crsinst -n rac,rac2
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "rac".
Checking user equivalence...
User equivalence check failed for user "oracle".
Check failed on nodes:
rac
WARNING:
User equivalence is not set for nodes:
rac
Verification will proceed with nodes:
rac2
The problem is only with the first node(rac). The second node passes succesfully.
ssh works fine. Not sure what is wrong!
Thanks!Did you do Configure SSH for User Equivalence ?
Or
Did you Establish User Equivalence ?
If yes.. please check...
$ ssh rac hostname
rac
$ ssh rac2 hostname
rac2
You should Establish User Equivalence before...
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
If You don't configure ssh for user equivalence
http://www.oracle.com/technology/pub/articles/smiley_rac10g_install.html
Or
read SSH User equivalence is not set up on the remote nodes -
User equivalence check failed for user "oracle" while running cluvfy
Hi All,
I am getting User equivalence error as follows while executing cluvfy. I want to install CRS on this server.
oracle@node200$ ./runcluvfy.sh stage -pre crsinst -n node200,node201,node202
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "node200".
Checking user equivalence...
User equivalence check failed for user "oracle".
Check failed on nodes:
node202,node201,node200
ERROR:
User equivalence unavailable on all the nodes.
Verification cannot proceed.
Pre-check for cluster services setup was unsuccessful on all the nodes.
I have sucessfully configured ssh and able to do ssh from all the nodes without prompting for the password. Also oracle uid and gid on all the servers are same.
I also checked in .kshrc file and there is no tty entry in that file. and I have also setup /etc/hosts.equiv file on all the node.
I still get the user equivalance error. Can anybody help me in this ?
Regards,
Raj.Hi,
thanks.
i need some more help because first time i am working on RAC,
i am also having User equivalence check failed for user "oracle"
i got two machines, one is IBM machine and one is DELL machine installed with solais 10 (AIX installation). both machines are not connected by private network now. and no shared external HDD available now. it will take one week time to set up the HW. the user equivalence check depends the above two factors?
now public network is available and node reachability test "passed"
could you please tell me what may be the reason for the user equivalence check in my case. details are given below
i have oracle user in both machine. user creation done through SMC. home directory is /export/home/oracle
the following are the details.
1) $ ssh pc000905 id -a oracle
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
uid=100(oracle) gid=300(oinstall) groups=301(dba)
$ ssh pc026376 id -a oracle
Enter passphrase for key '/home/oracle/.ssh/id_rsa':
uid=100(oracle) gid=300(oinstall) groups=301(dba)
2) user nobody exists.
3) all files n .ssh directory have same permissions.
4) ssh and scp is working with out password(rsa and dsa keys generated).
5) oracle user is using bourne shell
6)soft link of /usr/bin/ssh and /usr/bin/scp are created to /export/home/oracle/bin
7)ForwardX11 is "yes" in sshd_config
8) created a config file in .ssh directory and ForwardX11 is "no" in that file
8) umask =022 in both nodes.
error displaying is
$/export/gome/cluvfy/runcluvfy.sh stage -pre crsinst -n pc026376,pc000905
Performing pre-checks for cluster services setup
Checking node reachability...
Node reachability check passed from node "PC026376".
Checking user equivalence...
User equivalence check failed for user "oracle".
Check failed on nodes:
pc026376,pc000905
ERROR:
User equivalence unavailable on all the nodes.
Verification cannot proceed.
Pre-check for cluster services setup was unsuccessful on all the nodes.
$ -
Use of Oracle pump utility as equivalence of SQL bcp utility??
can anyone throw any pointers to how to use Oracle pump utility as equivalence of SQL bcp utility??
The equivalence of BCP is SQL*Loader. Data pump is used for export/import. During an import operation it can read just a file created by data pump export.
-
Querying Oracle Text using phrase with equivalence operator and NEAR
Hello,
I have two queries I'm running that are returning puzzling results. One query is a subset of the other. The queries use a NEAR operator and an equivalence operator.
Query 1:
NEAR((sister,father,mother=yo mama=mi madre),20) This is returning 3 results
I believe Query 1 should return all records containing the words sister AND father AND (mother OR yo mama OR mi madre) that are within 20 words of each other.
Query 2 (a subset of Query 1):
NEAR((sister,father,mother=yo mama),20) This is returning 5 results
I believe Query 2 should return all records containing the words sister AND father AND (mother OR yo mama) that are within 20 words of each other.
Why would Query 1 be returning fewer results than Query 2, when Query 2 is a subset of Query 1? Shouldn't Query 1 return at least the same amount or more results than Query 2?
~MimiFor future questions about Oracle Text, you can try the Oracle Text forum at: Text
There you have more chances of recieveing an awnser. -
ADF Equivalents of Common Oracle Forms Triggers
Hello,
is there some document guide, explaining how different tasks and triggers are accomplished using ADF?
I found this one:
http://www.oracle.com/technology/products/jdev/tips/muench/formstriggers/index.html?_template=/ocom/print
but it is a bit old and I think some of the solutions are not used anymore.
Does this document has an updated version?
Thanks in advance.Valhery,
It is indeed an old document, but is still very applicable today.
You may also be interested to review the material [url http://www.oracle.com/technology/products/jdev/collateral/4gl/formsdesignerj2ee.html]here
John
Maybe you are looking for
-
Connect a keyboard wirelessly to apple tv
How can I connect my apple wireless keyboard to apple tv?
-
Share only specific groups with users over cardDAV?
OS X Server 3.2.2 I've successfully set up the Contacts server, but it appears that cardDAV syncing is an all-or-nothing prospect. There appears to be no way to sync only select groups of contacts with select users or groups. Instead, it appears yo
-
I just got a dutch Photo Mag that compared Lightroom 2 to Capture One 4. I was amazed at the conclusion Capture One won the contest, based upon image quality results. I immediately downloaded a 30 day trial and compared LR, PS cS3 and CO side by side
-
Networked Printing Through a Windows PC
I just upgraded my network to Linksys N router. Most of connections are working, but I have two vexing problems. I cannot print to Laserjet that is connected to an HP Laptop. I have tried several of the suggestions on the forum (using CUPS, manually
-
BT ID Set-up I Can't Get Past Stage 3
I contacted BT Help a week ago to point out that I input a new password for the new BT email but when I click on "Conitinue" it reverts back to the blank password form again. Since then I have had three calls from tech support, and two from a supervi