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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 from row to col

Author  Topic 

adi1982
Starting Member

3 Posts

Posted - 2010-12-28 : 07:13:01
hello everybody
i have a small mission i need to convert all my data in table from row to col and i also need to remove all punctuation marks and i also need to find top 3 words that repeat them selves.(i am using group by)
i succeded remove all punctuation marks but now im having trouble to convert to col...
can somebody tell me what should i do?
[url]http://img88.imageshack.us/img88/7158/99662726.jpg[/url]
[urlhttp://img59.imageshack.us/img59/145/mywayn.jpg][/url]

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-12-28 : 07:38:07
Use the PIVOT operator or CASE statement to turn rows in to columns. If you post your table structure(s) here with some sample data you can get more precise help.

Jim

Everyday I learn something that somebody else already knew
Go to Top of Page

adi1982
Starting Member

3 Posts

Posted - 2010-12-28 : 13:28:16
hi jim
you have here the sql file,please not that im also importing from csv file(i did it successfully)
thx
adi
Go to Top of Page

adi1982
Starting Member

3 Posts

Posted - 2010-12-28 : 13:28:51
quote:
Originally posted by adi1982

hi jim
you have here the sql file,please not that im also importing from csv file(i did it successfully)
thx
adi



[url]http://www.2shared.com/file/knN7t8Te/___online.html[/url]
Go to Top of Page

jimf
Master Smack Fu Yak Hacker

2875 Posts

Posted - 2010-12-28 : 13:39:32
Sorry, I don't click on links from people I don't know.


Jim

Everyday I learn something that somebody else already knew
Go to Top of Page
   

- Advertisement -