Micah 1/15/2016 9:00:38 AM

Help with a SQL query

Can you help with the following select query that I need for a client?



IV10200 – Inventory Receipts (ONE)

IV10201 – Inventory Receipts Detail (MANY)   



r.itemnmbr as 'Item',

r.trxloctn as 'Location',

r.DATERECD as 'DocDate',

r.rcptnmbr as 'Receipt No',

r.RCTSEQNM as 'Receipt SEQ',

r.qtyrecvd as 'Qty Received',

r.QTYSOLD as 'total qty sold',

r.unitcost as 'Unit Cost',

s.origindocid as 'Sales Doc',

s.qtysold as 'Qty Sold'

from IV10200 r

join IV10201 s on r.itemnmbr = s.ITEMNMBR and r.RCTSEQNM = s.SRCRCTSEQNM

order by r.ITEMNMBR



Here’s where I need your help, For r.qtyrecvd I only want an amount to appear on the first row all the others should be zero.





Version: Unknown or N/A
Section: SQL Scripts

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables