/ Published in: SQL
Expand |
Embed | Plain Text
DROP PROCEDURE dbo.InsertIfNotThere GO CREATE PROCEDURE dbo.InsertIfNotThere @Bezeichnung nchar(256) AS IF ((SELECT COUNT(*) FROM [pbPlus].[dbo].[lookup_cat1] WHERE bezeichnung = @Bezeichnung ) = 0) begin INSERT INTO [pbPlus].[dbo].[lookup_cat1] (bezeichnung) VALUES (@Bezeichnung) end GO exec dbo.InsertIfNotThere N'4'
You need to login to post a comment.
