Skip to Content
Former Member
Dec 09, 2013 at 08:16 AM

SQL Query to Display Items in a Bin Location


Hi SQL Experts. I've written a query to display items in a particular Row and can choose eg A to D rows. What I want to do now is to be able to select the sub levels and select eg: A12 to D14.

I'm on V9 PL07 Can anyone help? This is what I have so far:

select t0.ItemCode, t1.ItemName, isnull(t3.OnHandQty,0) as 'On Hand', t2.BinCode, t2.SL1Code, t2.SL2Code, t0.WhsCode from OITW T0

inner join OITM t1 on t0.ItemCode = t1.ItemCode

inner join OBIN t2 on t2.AbsEntry = T0.DftBinAbs

left outer join OIBQ t3 on t0.ItemCode=t3.ItemCode and t0.WhsCode = t3.WhsCode

where t2.SL1Code between '[%0]' and '[%1]'

order by t2.SL1Code, t2.SL2Code, t0.ItemCode