assassin87 Posted December 12, 2011 Share Posted December 12, 2011 Hi everyone, i want to ask a question. I have some company name and totalroom in my procedure. But when i execute my procedure they are coming twice or more. İ want to sum companies at once. İ took a photo if you check that u will understand what i mean. http://imageshack.us/content_round.php?page=done&l=img546/5725/adszobb.jpg&via=mupload&newlp=1 here is my sql SELECT S.agency, SUM(S.totalroom) ODA, SUM(S.totalpax) KISI, (S.totalrevenue) GELIRFROM SP_FORECAST_OCC_LINE_DAY('01.01.2011','31.12.2011') Swhere S.resmarket='IC PAZAR' AND S.transdate BETWEEN '01.12.2011' and '31.12.2011'GROUP BY S.totalroom, S.agency, s.resmarket, S.totalrevenue Link to comment Share on other sites More sharing options...
justsomeguy Posted December 12, 2011 Share Posted December 12, 2011 You probably want to group only by the agency. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.