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.
The error happens where it passes the id of the shopper. @idShopper int
/* Retrieves the last basket for the shopper */
Create Procedure sp_RetrieveLastBasket AS
/* Pass in the ID of the shopper */
/* 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
and another error that happens where @idShopper is referenced.