i have one SQL Table in MS SQL 2008, and i want to have the results in one grid in different columns.
The result should be in Column Cost1 and column Cost2 and one Row.
In this Statement the result is in one Column and two Rows.
select SUM(costs) AS costs1 from costs where ID = 1050
select SUM(Amount) AS costs2 from costs where (type = 1 or type = 4)and ID = 1050;
do you have any ideas how can i do this?
Thank you very much,