| | |
Select first instance of a product having negative in stock quantity
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
Hi,
I don't know if I got u but try:
SELECT TOP 1 part_no, curr_date, cost_layer_qty
FROM inv_tran
WHERE (cost_layer_qty < 0)
ORDER BY cost_layer_qty DESC
Hope this works for you.
I don't know if I got u but try:
SELECT TOP 1 part_no, curr_date, cost_layer_qty
FROM inv_tran
WHERE (cost_layer_qty < 0)
ORDER BY cost_layer_qty DESC
Hope this works for you.
It is never about the number of languages you know, you either have the logic of programming or you don't ...
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
Some of the codes I post are collected from different sites during the past couple of years, so I would like to thank them for their help and for enabling me to help.
![]() |
Other Threads in the MS SQL Forum
- Previous Thread: MSSQL 2000 Query Trouble
- Next Thread: Help Figuring Out Proper Database Schema/Design
| Thread Tools | Search this Thread |





