SQL_Interface fails INSERT INTO
Bongo from Burma  [2 posts]
2 months
Dear RR team,

I downloaded your trial to check the creation of a smart barrier. The RR part should be reading the license plates of the vehicles. That I kind of did. The problem comes when I want to export the data to a MySQL server I created locally. The connection is OK but I get a syntaxt error which I'm pretty sure it's false. The screen's code is:
insert into vehicle_movement (vehicle_movement_id) values ([PLATE_NUMBER])

Although I tried with ''s and "<db>." and everything I thought might cause this.

Just the RR Error Text makes no sense: "Unknown column 'CA1077PB' in 'field list'."

The error # 42S22 is general MySQL error but no RR related help I found on Google. :(

Steven Gentner from United States  [1413 posts] 2 months
For literal values you may need to include quotes around the value:

insert into vehicle_movement (vehicle_movement_id) values ("[PLATE_NUMBER]")

Bongo from Burma  [2 posts] 2 months
Thank you Steven!

Actually it worked with '[PLATE_NUMBER]' . Turned out MySQL syntax is how it works with String values. All strings should be in ' '.

P.S. - Slightly different issue but the 'date' symbols in [CLOCK_DATETIME] are bugged. Sending them to MySQL goes as 2 squares. Not a big deal though, I do CURRENT_TIMESTAMP generation in MySQL.

 Forum Index