renee35
MIS
- Jan 30, 2007
- 199
What I am trying to do is allow the user to return data based off of results being created from a new table. I have 2 tables that I need to join and dump the results into a new table, then join those fields to an existing query. Below is an example of what I am trying to do:
select column1, column2
into newtable
from table1
join table2
where table1.field = @mydb and table2.field = @state
From this point I want to take these results and add it to an existing query as such:
INNER join (
select column1, column2 from newtable
) r on 1=1
Thanks a bunch!!
-T
select column1, column2
into newtable
from table1
join table2
where table1.field = @mydb and table2.field = @state
From this point I want to take these results and add it to an existing query as such:
INNER join (
select column1, column2 from newtable
) r on 1=1
Thanks a bunch!!
-T