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 -> Hopefully Stupid Question

Hopefully Stupid Question

From: spence <devnull635_at_netscape.com>
Date: Tue, 4 Jun 2002 18:47:57 GMT
Message-ID: <Gx730C.2p6@research.att.com>


Hi,

Forgive me if I'm having a brain fart, but I can't seem to translate what I want to good SQL - I'm using Oracle 8.1.7. Here's the situation...

I have say 3 tables and each of them has a character based timestamp (don't ask) with an identical fieldname, TS. I want to select various fields from each of the 3 tables and order the results based on the timestamp field they all have in common, TS. Perhaps something similar to:

select

    table1.data1,
    table2.data2,
    table3.data3,
    table1.TS,
    table2.TS,
    table3.TS

from

    table1, table2, table3
order by TS;

I realize that the above won't work because the TS in the order-by clause is ambiguous. How can I tell it to combine all the TSs and sort the rows based on that?

Help!?!

S Received on Tue Jun 04 2002 - 13:47:57 CDT

Original text of this message

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