Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guy's
hope every one is fine.
i have one question from every one please give me the solution of my problem
i try to use sum function, inner join and group by clause in same time but its not working
please any one tell me how can i do this
i try this code but it show error

What I have tried:

    select s.[ProModelNo]+' '+p.ConditionPro+' '+p.ItemType    as 'Item Description',
     s.[ComName]       as'ComName',
 sum(s.AvailableQty)   as 'Avil'
from [dbo].[Stock] s
inner join [Products] p
on p.ModelNo=s.ProModelNo
group by  [ProModelNo],[ComName]
having  sum(s.AvailableQty)=0 or sum(s.AvailableQty)=1
Posted
Updated 17-Aug-18 10:16am

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900