Hello, I'm using snowflake odbc driver + database package for inserting some rows to a "dummy" database. My snowflake database-schema-table is the following:
I'm trying to insert a row from A360 bot (I have installed the ODBC driver for it and the "select" query is working fine) and I always face the same issue. The query is this one:
INSERT INTO INGEST_AUTOMATION.products VALUES (2,'psp',FALSE,'2010-09-09')
The error is the following:
There was a problem at line 2
This may be due to the following reason:
- There is a syntactical error in the SQL statement.
- SQL statement got timed out.
Screenshot of the error:
Could anyone help me? Why the INSERT INTO query works perfectly from snowflake and it doesn't from AA bot? Thanks!
Hi @Paul Hawkins ,
thanks for the answer. The problem was with the connection string (I was not indicating the warehouse explicitly, so as my user didn’t have any by default this error popped)
@Andoni Aguirre Aranguren I would suggest including the column references in your INSERT statement (like you do in your SNOWFLAKE example screenshot), doing this anyway is good practice as its explicit about the columns and which data goes where.
That aside, it could possibly be the FALSE that's causing the issue. If the column in your database is NULLABLE, does it work if you exclude it from your bot insert?
It may be an issue with parsing the FALSE, where it assumes it should be text and wrapped in quotes.
If that is the cause, id try wrapping it in quotes or seeing if you can replace the FALSE with a 0 or some equivalent number reference