g118481
asked on
Is it possible to streamline this query?
Hi,
I have this awful query that I would like to streamline, and add a where clause.
Any ideas?
SELECT *
FROM
table1
Where (firstout Between #MonthStart# and #MonthEnd#)
UNION all
SELECT *
FROM
table2
Where (firstout Between #MonthStart# and #MonthEnd#)
UNION ALL
SELECT *
FROM
table3
Where (firstout Between #MonthStart# and #MonthEnd#)
order by pk
I have this awful query that I would like to streamline, and add a where clause.
Any ideas?
SELECT *
FROM
table1
Where (firstout Between #MonthStart# and #MonthEnd#)
UNION all
SELECT *
FROM
table2
Where (firstout Between #MonthStart# and #MonthEnd#)
UNION ALL
SELECT *
FROM
table3
Where (firstout Between #MonthStart# and #MonthEnd#)
order by pk
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The tables are not really related, but they do have the same field names. The data is simple calendar data.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
exactly..
It would also help to know what kind of data you are pulling.