Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Hopefully Stupid Question
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
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