The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

creating stored procedure

I am working my way through a book using SQL Server and ASP to create an ecommerce website. The book is a little old and now I see the code for creating a SQL stored procedure has an error.

Code:

/* Retrieves the last basket for the shopper */
Create Procedure sp_RetrieveLastBasket AS
/* Pass in the ID of the shopper */
@idShopper int
AS
/* Select the basket data for all baskets assigned to the shopper
and where the order was never finished. We sort the data in
descending order so that the last basket is returned first. */
select * from basket
where idShopper = @idShopper and intOrderPlaced =0 and intTotal =0
order by dtCreated DESC

The error happens where it passes the id of the shopper. @idShopper int