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 |
|
eevans
Starting Member
48 Posts |
Posted - 2009-03-11 : 08:19:24
|
| Hello,I am working with columns whose values are abbreviations. The abbreviations' full names are located in a separate View which acts as a key (i.e. the abbreviations are in a column beside another column listing their full names).How do I write a SELECT statement to pull the abbreviation columns but return the full name of the abbreviation in the results?This is incorrect syntax but gives the just of what I'm trying to do.SELECT cust_id, interest_1 (REFERNCE interest_description FROM interest_view),interest_2 (REFERENCE interest_description FROM interest_view),interest_3 (REFERENCE interest_description FROM interest_view)FROM customer_masterThanks! |
|
|
darkdusky
Aged Yak Warrior
591 Posts |
Posted - 2009-03-11 : 08:28:32
|
| SELECT cust_id, interest_view.interest_descriptionFROM customer_masterJOINinterest_viewONcustomer_master.abreviation=interest_view.abreviation |
 |
|
|
eevans
Starting Member
48 Posts |
Posted - 2009-03-11 : 08:36:59
|
| Thanks! |
 |
|
|
darkdusky
Aged Yak Warrior
591 Posts |
Posted - 2009-03-11 : 08:50:59
|
| welcome |
 |
|
|
|
|
|