|
I have a Table IA with I Have 2 reference Tables
AND refIA table with I have another Table C with I have another Table V with I have Another Table S with I have to write a proc for my SSRS Report. The Parameters for my sql is CNumber is split into FromC and ToC which I have written as My question is if I need to to group by IA.ShipTypeGenId with totals for each IA.ShipTypeGenId is the above proc correct Thanks, Hanoi
(comments are locked)
|
|
try this: SELECT s.FName + ' ' + s.LName as SName , v.Name , refACC.Description , refIA.Description as IADescription , c.CNumber , http://c.ID as CGenID , Convert(varchar,c.BeginDate,101) as CBeginDate , Convert(varchar,c.EndDate,101) as CEndDate , Sum(IA.Amount) as TotalAmount , Count(IA.ShipTypeGenId)as IAShipCount , Sum(refACC.ScholarshipTypeGenID) as ScholarshipTypeGenID FROM A as IA INNER JOIN S ON s.SMemberGenid=IA.SMemberGenID INNER JOIN C ON http://c.ID=IA.CGenID INNER JOIN V ON http://v.id = IA.VGenID LEFT JOIN refAcc ON refAcc.AccGenID=IA.AGenID LEFT JOIN refIA ON refIA.IAShipGenID = IA.ShipGenID WHERE ( @IAShipDescription is NULL OR (refIA.IAShipDescription = @IAShipDescription) or( @IAShipDescription = 'ALL') ) Group By SName , v.Name , refACC.Description , IADescription , c.CNumber , CGenID , CBeginDate , CEndDate Order By c.BeginDate desc
(comments are locked)
|
|
oh my gad,so hard maybe you can buy something for relax example herve leger so sex.
(comments are locked)
|


It is not http:// but c.ID as CGEnID