Hello All,
Question is that I use two sql queries to pull data.
one query pulls data from today going in the past, another one pull data from tommarow going foward.
Was wondering how to combine into one query as there the same columns types only differnce is one is historical the other is future.
Something like:
Select ALL
FROM
a.db.table.past
join
b. db.table.future
a. db.table.future = b.db.table.past
where
a.date_key >= ? and a.date_key<= ?
or
b.date_key >= ? and b.date_key<= ?
or
a.date_key >= ? and b.date_key<= ?
thanks
Question is that I use two sql queries to pull data.
one query pulls data from today going in the past, another one pull data from tommarow going foward.
Was wondering how to combine into one query as there the same columns types only differnce is one is historical the other is future.
Something like:
Select ALL
FROM
a.db.table.past
join
b. db.table.future
a. db.table.future = b.db.table.past
where
a.date_key >= ? and a.date_key<= ?
or
b.date_key >= ? and b.date_key<= ?
or
a.date_key >= ? and b.date_key<= ?
thanks