Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 insert into

Author  Topic 

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-01-19 : 09:53:36
i have a query which identifies entries which exist in one table but not another:

SELECT * FROM dbo.all_from_excel t1
WHERE MNINO NOT IN (SELECT MNINO FROM MNI t2 WHERE t2.MNINO=t1.MNINO)

Now, i would like the results of that query inserted into a like table in the same db (dbo.all_from_excel_not_in_MNI)

What would that query look like?

thanks

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-01-19 : 09:55:22
select *
into Table_that_not_exists
from ...
where ...


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2012-01-19 : 09:57:15
thank you.
Go to Top of Page
   

- Advertisement -