Item ledger entry SQL entry type

Hello,

I like to bring inventory remaining quantity and consumption into one pivot table. But when I add WHERE, remaining quantity become 0.

My script is like this.

SELECT L.[Remaining Quantity], L.[Quantity], L.[Entry Type]
FROM [CRONUS Canada, Inc_$Item Ledger Entry] AS L
WHERE L.[Entry Type] = ‘5’

SQL expert please help. Thank you.

Not sure you need an SQL expert, but a someone who knows the data. Consumption entries will typically not have a remaining quantity.

Compare with the actual data, as seen from with NAV, to validate your output.

Is it giving you the expected Data result from SQL Side???

If not then you need to cross verify there in before you think from Pivot Table. [emoticon:c4563cd7d5574777a71c318021cbbcc8]