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.
Author |
Topic |
learntsql
524 Posts |
Posted - 2010-09-06 : 07:06:53
|
Hi All,I have a table which already has some records,When i insert new data how to ignore codes which are already there.Can i use join caluse or should i write Sub Query.TIA. |
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-09-06 : 07:12:14
|
u can use not exists(), not in tooif not exists(select 'x' from tbale_name where codes='xxxx')insert into table_name....insert into table_name....where codes not in('xxxx','yyyy')Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
|
|