mcnewsxp
2012-11-14 19:12:06 UTC
so who do make sure the row you're about to insert doesn't already exist?
i tried:
If Not Exists(select * from tablename where code='1448523')
Begin
insert into tablename (code) values ('1448523')
End
and:
insert into tablename (code)
Select '1448523' Where not exists(select * from tablename where code='1448523')
neither worked for me
i tried:
If Not Exists(select * from tablename where code='1448523')
Begin
insert into tablename (code) values ('1448523')
End
and:
insert into tablename (code)
Select '1448523' Where not exists(select * from tablename where code='1448523')
neither worked for me