mysql weewx - troublesome interval column

30 views
Skip to first unread message

James Runser

unread,
Jan 11, 2023, 4:38:00 PM1/11/23
to weewx-user
I'm trying to insert water temperature data from a different monitor stack and am flummoxed by the interval column. Any attempt to interact with interval fails. What gives here? 

A simple example:
MariaDB [weewx]> select count(dateTime) from archive;
+-----------------+
| count(dateTime) |
+-----------------+
|           14200 |
+-----------------+
1 row in set (0.019 sec)

MariaDB [weewx]> select count(interval) from archive;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') from archive' at line 1
MariaDB [weewx]> select count(usUnits) from archive;
+----------------+
| count(usUnits) |
+----------------+
|          14200 |
+----------------+
1 row in set (0.019 sec)


James Runser

unread,
Jan 11, 2023, 4:45:07 PM1/11/23
to weewx-user
Whoops! Figured it out - interval is a reserved word in mysql - "interval" instead of interval works nicely. Sorry for the trouble.
Reply all
Reply to author
Forward
0 new messages