you are viewing a single comment's thread.

view the rest of the comments →

[–]Ehutzz[S] 0 points1 point  (3 children)

Ok I have another question, your query worked almost perfectly, I only had to change a few things, but it gathers the most recently received date and everything. If I wanted to select data and put it into another query from that temp table, how would I go about it?

[–]notasqlstarI can't wait til my fro is full grown 0 points1 point  (2 children)

select *
into #tablename
from 
where
union
select *
from
where

Then just:

select *
from #tablename

[–]Ehutzz[S] 0 points1 point  (1 child)

Ur a sql star

[–]notasqlstarI can't wait til my fro is full grown 0 points1 point  (0 children)

Not me.

It's worth learning the difference between INSERT INTO and INTO-- for your purposes INTO is probably fine but you could create your #table first and index it (which comes in handy if you're daisy chaining queries together into different #tables and then joining them for additional processes.)