Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-05-11 : 07:32:47
|
| mukundhan writes "Hi,I need to fetch a value from a table which will return some 4-5 records and i need that as a single row with as much as columns.say,********table1id name-------01 sales02 date03 status********table2value empid id--------------x 0001 01xx 0001 02xxx 0001 03if i try to fetch the value from table2 where empid=0001 then i'll be having 3 records but my output should look likeempid sales date status-----------------------0001 x xx xxxThanks,Mukundhan.S" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-05-11 : 07:33:42
|
| You need a cross tab, try this:http://weblogs.sqlteam.com/jeffs/archive/2005/05/02/4842.aspx |
 |
|
|
|
|
|