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 |
|
boehnc
Starting Member
15 Posts |
Posted - 2012-02-01 : 13:11:00
|
| I have a Where statement that looks at around 3 different sets of diagnosis codes.I place all the codes in my where statement, but I want another column that will indicate which set they come from.I guess I can create a lookup table and do a join, but was wondering if there was a way to use code in my query? Thanks for any info. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-01 : 13:13:17
|
| sorry can you elaborate with some sample data and show how you want output?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
boehnc
Starting Member
15 Posts |
Posted - 2012-02-01 : 15:07:06
|
| sure. 523.1 and 253.1 is CABG, 112.2 is Cardiac, 156.3 and 234.4 are low back. I wanted in column 2 to display the Group to which the code belongs. (there might be 20 or 25 different codes per group, but this is a simple example). column1, column2523.1, CABG253.1, CABG523.1, CABG112.2, Cardiac112.2, Cardiac156.3, Low Back234.4, Low Back |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-01 : 15:13:30
|
| thats what its currently displaying isnt it? isnt the group code also in the same table?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|