jadams0173
Technical User
- Feb 18, 2005
- 1,210
Using SQL 2000
I've got about 4000 records that have 4 columns with numbers in them. I need to take the minimum number from the 4 columns and place it in another column. Is there a way to do it without selecting each value and gonig through the if this one is less than that one.....
The lowest column in the example is the one I need to update.
Oh yeah. cola - cold must be greater than 0.
example data
col a colb colc cold lowest
45 93 92 8 8
23 0 45 65 23
I've got about 4000 records that have 4 columns with numbers in them. I need to take the minimum number from the 4 columns and place it in another column. Is there a way to do it without selecting each value and gonig through the if this one is less than that one.....
The lowest column in the example is the one I need to update.
Oh yeah. cola - cold must be greater than 0.
example data
col a colb colc cold lowest
45 93 92 8 8
23 0 45 65 23