Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using BETWEEN
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01554816
Message ID:
01554828
Vues:
34
>>>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?

:-)
I don't know what she wants as a result :-)
That select will return every record where @TotEAP between AdjLow and AdjHigh :-)
So she will update the whole table with the last result from this query (and it could be random).
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform