I have a lot of NUL
| 1517853600 | 17 | 5 | NULL | 940.366666666667 |
1020.29243442603 | 16.7 | NULL | 68 |
NULL | NULL | NULL | NULL | NULL
| 0 | 0 | NULL | NULL |
NULL | 0.0614686128091416 | 1197.652125 | 0 | NULL | NULL
| NULL | NULL | NULL | NULL | NULL | NULL |
NULL | NULL | NULL | NULL | NULL | NULL
| NULL | NULL | NULL | 0 | NULL |
NULL | NULL | NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
0 | NULL | NULL |
| 1517853900 | 17 | 5 | NULL | 940.416666666667 |
1020.34586234733 | 16.7 | NULL | 68 |
NULL | NULL | NULL | NULL | NULL
| 0 | 0 | NULL | NULL |
NULL | 0.0613554172619733 | 1197.652125 | 0 | NULL | NULL
| NULL | NULL | NULL | NULL | NULL | NULL |
NULL | NULL | NULL | NULL | NULL | NULL
| NULL | NULL | NULL | 0 | NULL |
NULL | NULL | NULL | NULL | NULL |
NULL | NULL | NULL | NULL |
0 | NULL | NULL |
Should they be ZEROED out.Is it better to have 0 rather than NULL?
On Tuesday, 13 March 2018 20:21:16 UTC+11, gjr80 wrote:
>
> Greg,
>
> The --check-strings (and its friend --fix-strings) action is there for
> SQLite databases (do a wee_database --help). It will run on a MySQL
> install but essentially has no effect. Having a null/NULL value in a
> database is fine, that is how the python None values are stored. However,
> having a string or a null string in a weeWX database field is not OK, that
> is what --check-strings will pickup and --fix-strings will fix. I'm not
> sure why the null string only comes up for SQLite databases, before my
> time, though one way that you can easily get them if you are not carfeul is
> through use of a graphical db browser/editor.
>
> Gary
>
> On Tuesday, 13 March 2018 19:02:58 UTC+10, Greg from Oz wrote:
>>
>> Hi,
>> I am using mqysql as my weewx database.
>> I run the wee_database --check-strings and it comes back clean but if I
>> run mysql command to look for NULL I get a lot of results.
>> Anyone know why this would be the case?
>>
>> Thanks
>>
>> wee_database --check-strings
>> Using configuration file /etc/weewx/weewx.conf
>> Using database binding 'wx_binding', which is bound to database
>> 'archive_mysql'
>> Preparing Null String Check, this may take awhile...
>> Checking record: 488186; Timestamp: 2018-03-12 10:05:00 AEDT (1520809500)
>> No null strings found.
>> Completed Null String Check in 28.89 seconds.
>>
>>
>> Yet, if I run the command below it shows I do have NULL values.
>>
>>
>> MariaDB [weewx]> select dateTime, rain , rainRate from archive where rain
>> IS NULL;
>> +------------+------+----------+
>> | dateTime | rain | rainRate |
>> +------------+------+----------+
>> | 1501541984 | NULL | 0 |
>> | 1501546184 | NULL | 0 |
>> | 1501563583 | NULL | 0 |
>> | 1501564184 | NULL | 0 |
>> | 1501564490 | NULL | 0 |
>> | 1501585184 | NULL | 0 |
>> | 1501590884 | NULL | 0 |
>> | 1501634684 | NULL | 0 |
>> | 1501635284 | NULL | 0 |
>> | 1501636784 | NULL | 0 |
>> | 1501656884 | NULL | 0 |
>> | 1501659584 | NULL | 0 |
>> | 1501675645 | NULL | 0 |
>>
>>
--
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.