ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DISTINCT records from ORACLE DB

Post new topic  Reply to topic
 DISTINCT records from ORACLE DB « View previous topic :: View next topic » 
Author Message
kirankinnu
PostPosted: Thu Feb 07, 2008 6:25 am    Post subject: DISTINCT records from ORACLE DB Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Feb 07, 2008 6:27 am    Post subject: Reply with quote

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
View user's profile Send private message
kirankinnu
PostPosted: Thu Feb 07, 2008 6:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu Feb 07, 2008 6:43 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Feb 07, 2008 6:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2065646
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Thu Feb 07, 2008 6:49 am    Post subject: Reply with quote

Centurion

Joined: 12 Jun 2004
Posts: 128
Location: Chicago, IL

Oracle version is 10G and Broker version is 6.0
Back to top
View user's profile Send private message
kirankinnu
PostPosted: Thu Feb 07, 2008 7:05 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DISTINCT records from ORACLE DB
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.