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
 Convert 1 ROW to Multiple Rows

Author  Topic 

Shivapdit
Starting Member

3 Posts

Posted - 2009-09-24 : 08:25:09
Hi All,

I am having source table with below listed data set.

EMPID ADD
101 Chennai,Tamilnadu,India
102 Delhi,India
103 6th Street,Downst,CY,USA
----
----

I need create a View with below data format

EMPID ADD
101 Chennai
101 Tamilnadu
101 India
102 Delhi
102 India
103 6th Street
103 Downst
103 CY
103 USA
--

Please help me in this reagrd..

Thanks in advance...

Regards,
Shiva

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-24 : 08:36:48
http://www.sqlteam.com/article/parsing-csv-values-into-multiple-rows

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Shivapdit
Starting Member

3 Posts

Posted - 2009-09-24 : 09:00:16
Madhivanan, Thanks a lot for quick reply...

But I am not able to use CHARINDEX function in SQL.
Any idea???

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-24 : 09:02:08
quote:
Originally posted by Shivapdit

Madhivanan, Thanks a lot for quick reply...

But I am not able to use CHARINDEX function in SQL.
Any idea???




Which version of SQL Server are you using?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -