Dear Experts,
I have write the SQL query to show the total no. of quantity available in bin content from SQL server. Here I don't want to show these serial or lot no where have not positive values. I want to show data only serial/lot have only positive values. In my query bot are coming, please help me to rectify it.
My Query is below:
select distinct x.[Item No_],[UAT Private Limited$Item].Description,x.[Variant Code], SUM(x.[Qty_ (Base)]) "Quantity",x.[Serial No_],x.[Lot No_],y.No_,y.[Registering Date] from [UAT Private Limited$Warehouse Entry] x
left outer join [UAT Private Limited$Item] on [UAT Private Limited$Item].No_ = x.[Item No_]
left outer join [UAT Private Limited$Registered Whse_ Activity Hdr_] y on x.[Reference No_] = y.No_
where x.[Bin Code]='101-RG1-N001' and x.[Location Code] = '101' and x.[Zone Code] = '101-RG1'
group by x.[Item No_],x.[Variant Code],[UAT Private Limited$Item].Description,x.[Serial No_],x.[Lot No_],y.No_,y.[Registering Date]
having sum([Qty_ (Base)])<>0
I will be thankful if someone can give resolution on these.