|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Total Sales
Hi all
I have three tables in an Access Database. They are, Item Table ItemID, Description, Price, Type Inventory InventoryID, ItemID, AcquiredDate, OnHand Sales SaleID, InventoryID, Date, QntySold How do I find the total sale amount of all the items in a given date? Its for an ASP page. Heres my SQL so far The SearchText is where the required date goes from ASP text box. SQL = "SELECT Sale.Date, Sale.QntySold*Item.Price AS TotalSales FROM Item, Inventory, Sales WHERE ((Sale.InventoryID = Inventory.InventoryID) AND (Inventory.ItemID = Item.ItemID)) AND ((Sale.Date) = '%"SearchText"%');" But its not working. Can someone tell me what is wrong?? Thanks |
|
#2
|
|||
|
|||
|
because you're trying to match the date, substitute the %s for # signs
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > Total Sales |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|