Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

SQL Mulitple Select Statemenst in one grid (SQL2008)

Avatar of bounty457
bounty457 asked on
Microsoft SQL Server 2008
6 Comments1 Solution117 ViewsLast Modified:

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,
regards Bounty
Avatar of Pratima Pharande
Pratima PharandeFlag of India image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answers