Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
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?

 

Tables:

IV10200 – Inventory Receipts (ONE)

IV10201 – Inventory Receipts Detail (MANY)   

 

select

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.

 

Thanks

 

 


 
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