Skip to content
Advertisement

sql server – checking existence for each row in insert

I need to do an insert and check for each row if the field “partita_iva” is already in this table, if yes the field “flag” must be 1, if not then must be 0. I did this, but it set 1 for all the rows, even if should be 1 just for one row

Advertisement

Answer

It can probably be simplified.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement