Author |
Message
|
kirankinnu |
Posted: Thu Feb 07, 2008 6:25 am Post subject: DISTINCT records from ORACLE DB |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Hello Folks,
How do we get distinct records from ORACLE database. Is there a way that after getting the records, eliminate the duplicate ones. I am trying to get DISTINCT records from ORACLE table using ESQL. We are at version 6.
THanks,
Kiran |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 07, 2008 6:27 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
How would you do this with a standard SQL query?
Use that. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kirankinnu |
Posted: Thu Feb 07, 2008 6:36 am Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
I am using PASSTHRU to execute the SQL Query and by giving the SQL query with DISTINCT I am getting this error "[DataDirect][ODBC Oracle driver][Oracle]ORA-01791: not a SELECTed expression ".
Without DISTINCT I am getting all the fields with Duplicates.
THanks,
Kiran |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 07, 2008 6:43 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kirankinnu wrote: |
I am using PASSTHRU to execute the SQL Query and by giving the SQL query with DISTINCT I am getting this error "[DataDirect][ODBC Oracle driver][Oracle]ORA-01791: not a SELECTed expression ".
Without DISTINCT I am getting all the fields with Duplicates.
|
Now why didn't you say this in the first place?!?
So what version of broker & Oracle are you using? Are you sure the DataDirect ODBC driver is the right one (I have a faint memory of broker being picky about it's ODBC driver, but can't pin it down). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 07, 2008 6:48 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
kirankinnu |
Posted: Thu Feb 07, 2008 6:49 am Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Oracle version is 10G and Broker version is 6.0 |
|
Back to top |
|
 |
kirankinnu |
Posted: Thu Feb 07, 2008 7:05 am Post subject: |
|
|
 Centurion
Joined: 12 Jun 2004 Posts: 128 Location: Chicago, IL
|
Thanks Jeff for the link,
I was using DISTINCT along with ORDER BY which is causing the error. Once I removed ORDER BY I got the array.
Thanks guys for your support,
Kiran |
|
Back to top |
|
 |
|