Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stuck Procedure...
Message
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01135713
Message ID:
01135790
Views:
11
You can simplify your stored procedure by passing the second parameter as XML. See Re: Sending a list from vfp Message #829213 for sample code. Also you don't need a temp table to delete non-existing menu groups. You can use derived table instaed
			-----------------------------------------
			-- Delete "Removed" Items
			-----------------------------------------
				DELETE FROM tblMenuGroups 
				WHERE MenuText IN (
						SELECT [Group], MenuText, Visible 
					FROM (SELECT tblMenuGroups.[Group], 
						    tblMenuGroups.MenuText, 
						    tblMenuGroups.Visible, 
						    tblMenuStructure.MenuText AS MenuTextFilter 
						FROM 
						    tblMenuGroups 
LEFT OUTER JOIN tblMenuStructure ON tblMenuGroups.MenuText = tblMenuStructure.MenuText
					     ) UnMatched
					WHERE MenuTextFilter IS NULL
				) dl	
>OMG, I can't believe I missed that! Thank you so much.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform