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)
 Multiple Quantities of Products not available

Author  Topic 

Mortifier
Starting Member

11 Posts

Posted - 2003-08-09 : 03:43:08
Hi,
I have a Product table that contains the total number of that product available. When there is no more available, I don't want it to be available anymore (many of the products only have a quantity of 1).

Right now, the orders (details) placed and the shopping baskets are linked in a view where all rows are selected from the Product table so that if an item has 0 available in either of them, it is not available. It works fine with the order details and will still be available, but when it is added to the shopping basket, it is no longer available, even if there is a multiple quantity available. Any suggestions on how to utilize it correctly? I already have a column in the view to calculate the quantity already sold and it will not display records unless it is >0.

Thanks,
Kevin

nr
SQLTeam MVY

12543 Posts

Posted - 2003-08-09 : 05:22:58
Not sure what you are looking for here.
Sounds like you are asking for advice on how to correct a query but aren't showing it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -