Click here to Skip to main content
12,501,082 members (42,084 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: SQL-Server
Hi guys,

I have a table named EMPLOYEE as shown.

pk_emp_code Name Desc_Child1
----------- -------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
000001 DEMO123 ok
E0000860 AMITABH Yes,son
Mayy002 Mayy002 Yes,daughter,Delhi,South Delhi
Mayy003 Mayy003 Yes,daughter,Delhi
Mayy004 Mayy004 Yes,daughter,
Mayy005 Mayy005 Null

How can i get the result like this:

pk_emp_code name FirstField SecondField ThirdField FourthField
000001 DEMO123 ok
E0000860 AMITABH Yes son
Mayy002 Mayy002 Yes daughter Delhi South Delhi
Mayy003 Mayy003 Yes daughter Delhi
Mayy004 Mayy004 Yes daughter
Mayy005 Mayy005 Yes


Thanks in advance.
Posted 4-Mar-13 19:17pm
Comments
rakesh@bbspl.com 5-Mar-13 3:01am
   
Please help...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 5 Mar 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100