SQL Query on NAV 2013

Hi Everybody

I read this article. And I find it very good with what I need.



On SQL Query I edit :

	    @FromDate            DateTime,
        @ToDate              DateTime

SELECT SUM(Quantity) AS QuantityTot, [Item No_], [Location Code], [Lot No_], [Serial No_]
FROM dbo.[CRONUS Italia S_p_A_$Item Ledger Entry]
WHERE [Posting Date] BETWEEN @FromDate AND @ToDate 
AND [Item No_] LIKE '1%'
GROUP BY [Item No_], [Location Code],[Lot No_],[Serial No_]
HAVING ([Location Code]<>” AND (SUM(Quantity)) >0)


But when I add the variable I cannot link. Please help me solution.

Thanks so much


Parents Reply Children