Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 delete from Stored Procedure

Author  Topic 

joemama
Posting Yak Master

113 Posts

Posted - 2005-05-16 : 16:10:58
i have a shopping cart application that I want to have an image field (clear cart)when clicked delete all items in a table that are equal to a cookie and are null

I KNOW HOW TO EXPLAIN IT BUT NOT HOW TO WRITE IT

DELETE FROM [rsensations].[dbo].[ProdOrderDetails]
WHERE GUID=cookie.GUID AND DetailOrderID is Null

ANY HELP???? i am using ASP vbscript

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2005-05-17 : 08:32:32
You are on the wrong forum. This is a SQL forum, not an ASP forum.

As to the SQL part, you need to pass in those values to the proc.

CREATE PROCEDURE dbo.TrashOrder
(@PassedInValue varchar(50))

AS

DELETE FROM <table name>
WHERE [GUID] = @PassedInValue
AND DetailOrderID is NULL



*need more coffee*
Go to Top of Page
   

- Advertisement -