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.
| Author |
Topic |
|
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2008-07-07 : 00:56:07
|
| Hi,I have a following data in sql server table with userid, gender and city columns.Userid Gender CityAB001, RI003, TL006 Male TexasI require the output asUserid Gender CityAB001 Male TexasRI003 Male TexasTL006 Male TexasPlease i need this ASAP.Regards,Sachin |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-07 : 02:30:55
|
| if you're using sql 2005, you can use CROSS APPLY to join to this function and get your result. something like:-http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=104485 |
 |
|
|
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2008-07-11 : 01:26:01
|
| the function shows results only for first column i.eAB001RI003 TL006I want the output as:Userid Gender CityAB001 Male TexasRI003 Male TexasTL006 Male TexasKindly give me the code pleaseThanks for the reply |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-07-11 : 01:28:13
|
as visakh said you need to use CROSS APPLY KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
sachingovekar
Posting Yak Master
101 Posts |
Posted - 2008-07-11 : 01:45:49
|
| i am using sql server 2000 |
 |
|
|
|
|
|