Larry Brister
asked on
MS SQL Server first column with no zero
I have select statement the produces 9 columns
What I need returned is for columns 2 through 9
The results of the first column where the integer value > 0
example... the columns would be
IndividualID [1] [2] [3] ... etc
95487512 32546 0 33365
95487513 0 33358 33365
The desired final select would be
IndividualID OPCol
95487512 32546
95487513 33348
What I need returned is for columns 2 through 9
The results of the first column where the integer value > 0
example... the columns would be
IndividualID [1] [2] [3] ... etc
95487512 32546 0 33365
95487513 0 33358 33365
The desired final select would be
IndividualID OPCol
95487512 32546
95487513 33348
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect... tanks
>> was hoping there was some super-secret wonderful thing that was recently invented
I don't think so, though I'm curious too :-) ... but I suspect the multiple columns is going to necessitate a CASE or UNION ALL approach no matter what you do.
I don't think so, though I'm curious too :-) ... but I suspect the multiple columns is going to necessitate a CASE or UNION ALL approach no matter what you do.
ASKER