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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Update

Author  Topic 

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2008-11-26 : 10:08:10
Before i shut down for the day.

I have a insert into qry that runs fine no questions asked but I have come across a problem with some data missing. I have checked the main data and this was also missing I have been able to re populate the main data as it has no where clause but my main table I need hisoric kept is there any code I can use to find and insert the missing data.

Whitmoj
If you are in a hurry you will never get there

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-11-26 : 10:13:25
Do you want to insert missing data from main table to another table?

insert into table2(col1, col2)
select col1, col2
from main m left join table2 t2
on m.key = t2.key
where t2.key is null


Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

whitmoj
Yak Posting Veteran

68 Posts

Posted - 2008-11-27 : 05:31:19
Yes I will try your code

Thanks

Whitmoj
If you are in a hurry you will never get there
Go to Top of Page
   

- Advertisement -