Click here to Skip to main content
Rate this: bad
good
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 20:17pm
Comments
rakesh@bbspl.com at 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)



Advertise | Privacy | Mobile
Web01 | 2.8.150302.1 | Last Updated 5 Mar 2013
Copyright © CodeProject, 1999-2015
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