Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I do this in a stored procedure (multiple cmds)
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Can I do this in a stored procedure (multiple cmds)
Miscellaneous
Thread ID:
00833437
Message ID:
00833437
Views:
42
When a user deletes a master record, I want to delete the children in the children table (coSuper and coSuper2), I don't actually delete them, but change a flag (isactive) from true to false. Just wondering if this is ok in a stored procedure:
CREATE PROCEDURE ct_DelPrefCard
@tiCardID int

as
SET NOCOUNT ON
begin
--Delete the actual card
Update coSuper set isActive=0 where coSuperID=@tiCardID

--Delete the child records
Update coSuper2 set isActive=0 where coSuperID=@tiCardID

--Delete our linked listed items in the coCardAssign table
--delete from coCardAssign where coSuperID = @tiCardID

set nocount off

end
Thanks
Kirk
Next
Reply
Map
View

Click here to load this message in the networking platform