11 November 2008

List of inventory items that have not sold between two dates

View below list the inventory items that have not sold between two dates:

 

SELECT IV00101.* FROM

dbo.IV00101 INNER JOIN

dbo.IV00102 ON dbo.IV00101.ITEMNMBR = dbo.IV00102.ITEMNMBR

WHERE

(dbo.IV00101.ITEMNMBR NOT IN

(SELECT

dbo.SOP30300.ITEMNMBR

FROM dbo.SOP30300

INNER JOIN dbo.SOP30200

ON dbo.SOP30300.SOPNUMBE = dbo.SOP30200.SOPNUMBE

AND dbo.SOP30300.SOPTYPE = dbo.SOP30200.SOPTYPE

WHERE (dbo.SOP30200.DOCDATE BETWEEN

CONVERT(DATETIME, '2006-07-01 00:00:00', 102) AND CONVERT(DATETIME, '2008-10-30 00:00:00', 102))

))

AND (dbo.IV00102.QTYONHND > 0)

 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.

(required) 
(optional)
(required)