Entry 4770

QuickBooks (DataBlox) SQL - Inventory

   

Submitted by anonymous on June 3, 2010 at 6:02 p.m.
Language: SQL. Code size: 442 bytes.

SELECT vInvtItem.nKey,
  vInvtItem.sItemType,
  sFullName,
  rOnHandCount,
  SUM(rItemCount) AS SumItemCount,
  rOnHandCount - SUM(rItemCount) AS Difference,
  count(rItemCount) AS CountItemCount

FROM vInvtItem INNER JOIN aTranLine
  ON vInvtItem.nKey = aTranLine.kItem

WHERE bNoPost = False
  AND vInvtItem.sItemType = 'InvtPart'

GROUP BY vInvtItem.nKey, vInvtItem.sItemType,
  sFullName, rOnHandCount

ORDER BY sFullName

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).