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 |
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2012-05-24 : 02:58:26
|
| I have a list to pull out as below:One way : 1Return : 2Connecting bus : 3so the sample will be out like this :Bookingtype123Get from same table but different column, can I still pull the data into one column?For now there are 3 different new column as I am having error to put in one column.,CASE FareTypeWHEN 'Connecting' THEN 3ELSE FareJTypeEND"Bookingtype",CASE TripTypeWHEN 'return' THEN 2ELSE TripTypeEND"Bookingtype1",CASE TripTypeWHEN 'oneway' THEN 1ELSE TripTypeEND"Bookingtype2" |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-05-24 : 04:09:17
|
You are not very clear about what you have and what you want.So please give:- table structure- sample data- wanted outputMake it simple  No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|