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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to convert rows into columns

Author  Topic 

shaggy
Posting Yak Master

248 Posts

Posted - 2007-05-29 : 09:56:52
how to convert rows into columns.

Data in table
empcode basic
1 1000
2 2000
Required output
empcode 1 2
basic 1000 2000

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-29 : 10:06:36
Remember these two simple equations:

SQL Server = Efficient Data Retrieval
Front-End = Easier Data Formatting

Since,
your question = Data Formatting question
and Data Formatting <> SQL Server

The solution to your problem is,

DIIFE ! (= Do It In the Front-End)



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

shaggy
Posting Yak Master

248 Posts

Posted - 2007-05-29 : 10:16:12
dear harsh

data is like 1 1000
2 2000

i want data to be 1 2
1000 2000


can v handle this in a query
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-05-29 : 11:47:43
search for "pivot" around here

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -