How to create if else statement for execution stored procedure?
I have tried this query
IF exists ( select *,count(*) from [nsqm].[dbo].[Table_1]
group by col1,col2,col3,col4 having count(*) = 1 )
exec insert_table_1;
ELSE
PRINT 'no duplicate row';
I have message error like this:
Could not find stored procedure 'insert_table_1'.
Aucun commentaire:
Enregistrer un commentaire