Hello,
In a script i’m trying to run this request:
system.db.runQuery(“INSERT INTO IMPLANTPVA (REFIMPLANTPVA, NAMEEN, NAMEFR) VALUES (” + str(int(primer_key)) + “, '” + pva_name + “’, '” + pva_name + “’)”)
The line is inserted in the table but i also have this error: SQLSyntaxErrorException: ORA-00900: invalid SQL statement.
Someone can help me please
At a quick glance, it appears you are missing a single quote at the beginning of your values
Thank you for your answer but i don’t really see where i’m missing a quote and even with a simple query like:
system.db.runQuery(“INSERT INTO table (col1, col2, col3) VALUES (1, ‘hello’, ‘world’)”), i have the same error.
Sorry, I should have taken a closer look ![:slight_smile: :slight_smile:](http://forum.inductiveautomation.com/images/emoji/twitter/slight_smile.png?v=6)
For inserts, you need to use system.db.runUpdateQuery()
it’s working Thank you so much
1 Like