I need a query that looks like this:
I don't know how to give the single column from the inner query an alias so I can reference it from the outside query (hence the ???). In the SQL forum, I was advised to use "AS Q" after the inner query, but tried it in SQL+ and got errors.
Thanks to anyone who can help! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
Code:
select ??? from (
select substr(timestamp,0,10)
from table1
where substr(timestamp,0,10) < '2001-11-02'
and substr(timestamp,0,10) > '2001-10-26'
union all
select substr(timestamp,0,10)
from table2
where substr(timestamp,0,10) < '2001-11-02'
and substr(timestamp,0,10) > '2001-10-26'
)
group by ???
order by 1
Thanks to anyone who can help! Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com