Posted by akej via SQLMonster.com on 09/30/42 11:16
>Any ideas?
CREATE PROCEDURE AddUpdateDoorStyles
(
@myprojectid varchar(255),
@doorstyle varchar(255)
)
AS
IF EXISTS (select *
from myproject_doorstyles
where myproject_id = @myprojectid and door_style = @doorstyle)
Print 'ok'
ELSE
Print 'notOK'
----------------
or u can use
IF NOT EXISTS (select *
from myproject_doorstyles
where myproject_id = @myprojectid and door_style = @doorstyle)
Print 'notOK'
GO
--
Message posted via http://www.sqlmonster.com
[Back to original message]
|