Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Problem sorting results of a Union query passed to Oracle

Problem sorting results of a Union query passed to Oracle

From: David <davidbr93_at_hotmail.com>
Date: Mon, 21 Jun 1999 10:54:43 -0400
Message-ID: <376e51a5@news2.one.net>


I'm having a problem sorting the result of a UNION query. I'm using Oracle' s built in OLE controls within Visual Basic to pass the following statement when creating a dynaset.

SELECT * FROM logfile_h WHERE (ssn = '123456789') UNION SELECT * FROM logfile WHERE (ssn = '123456789') ORDER BY login_timestamp

When I run this query, Oracle returns "Invalid Column Name". The query runs fine without the ORDER BY clause. It also runs fine if I use the ORDER BY with only part of the select as in "SELECT * FROM logfile_h WHERE (ssn = '123456789') ORDER BY login_timestamp".

Any input appreciated.

Dave B. Received on Mon Jun 21 1999 - 09:54:43 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US