Well. to put actual numbers in
@TotEAP AdjLow AdjHigh ECLScore
3.8 3.5100 3.8600 96
3.81 3.5100 3.8600 96
3.809
3.8092
That is what I see when I run the "Update TestResult set ECLScore = (Select ECLScore from ScoreTable where @TotEAP between AdjLow and AdjHigh)" and plug in the appropriate numbers for @TotEAP
>Maybe you really didn't have records BETWEEN @TotEAP, when it is N(6,4)
>Just debug this.
>
>
>>Boris
>>
>>AdjLow and AdjHigh are numeric(6,4) fields in the table
>>
>>
>>Both of you
>>
>>The full SQL is
>>
>>Update TestResult set ECLScore = (Select ECLScore from ScoreTable where @TotEAP between AdjLow and AdjHigh) where SCN = @SCN
>>
>>
>>>>>Hi again, All
>>>>>
>>>>>I've got an SP that has the following
>>>>>
>>>>>
>>>>>@TotEAP numeric(6,4)
>>>>>@EAP numeric(7,5)
>>>>>
>>>>>**ListenEAP is already in my table from earlier update
>>>>>
>>>>>Select @TotEAP = (@EAP + ListenEAP)/2 from TestResult where SCN = @SCN &&This works as expected
>>>>>
>>>>>Update TestResult set ECLScore = (Select ECLScore from ScoreTable where @TotEAP between AdjLow and AdjHigh)
>>>>>
>>>>>
>>>>>AdjLow and AdjHigh are numeric(6,4).
>>>>>
>>>>>Here's the problem:
>>>>>
>>>>>The update doesn't happen with @TotEAP defined as a 6,4 (or even a 6,3) but it DOES work if @TotEAP is defined as a 6,2
>>>>>
>>>>>Nothing I'm reading in the help file is giving me any indication as to why it's not? Ideas?
>>>>>
>>>>>Thanks
>>>>
>>>>It depends how AdjLow and AdjHigh defined.
>>>
>>>The UPDATE looks a bit strange - do you want to update all rows in the table with the same constant value?
>>>
>>>E.g. what does select ECLScore from ScoreTable where @TotEAP between AdjLow and AdjHigh
>>>
>>>return?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place