Hello !

I just discovered this nice SQL command suggested in this discussion:

*UPDATE archive SET barometer=barometer+xxx WHERE dateTime < YYY;*

I'm interested in this to correct an other parameter with multiplication 
instead of addition. 
I just would like to confim the syntax to make sure I will not mess up my 
database:
so If I want to divide by 2 a value:

*UPDATE archive SET param_to_be_modified=**param_to_be_modified*0.5** WHERE 
dateTime < YYY;*

*or maybe:*

*UPDATE archive SET param_to_be_modified=**param_to_be_modified/2** WHERE 
dateTime < YYY;*

Is one of those working (or both).

Best regards,


Le jeudi 12 janvier 2017 00:36:58 UTC+1, Tom Keffer a écrit :
>
> Perhaps that's because it was originally translated from a Pascal program 
> <http://www.softwx.com/weather/uwxutils.html>. :-)
>
> -tk
>
> On Wed, Jan 11, 2017 at 2:07 PM, Gone Bush <[email protected] 
> <javascript:>> wrote:
>
>> Thanks for the replies, much appreciated. And apologies for the confusion.
>>
>> Tom Keffer's answer with the reference to the uwxutils.py module was the 
>> information is was after. But, being lazy by nature, I was hoping for a 
>> "here's the formula" type of answer. ;)
>>
>> I'm going through the code now and it doesn't seem that bad - even for a 
>> non-Python person.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to