You are viewing limited content. For full access, please sign in.

Question

Question

Incorrect syntax near '?'

asked on June 27, 2018

Done a delete quite a few times but cannot seem to get this to work.  Is my syntax really wrong?

DELETE
FROM RecordsBoxTemp where boxnumber = ?

I have not filled in the value in this screen but when I test this I get

Yet when I hardcode the value

I get no problems testing it..

 

Wondering what is missing here.  I have tried closing the workflow, creating a whole new Custom Query, etc.  

 

Thanks,

Chris

 

0 0

Replies

replied on October 18, 2021

Probably way too late to be relevant to @████████ but if like me you come across this: I had to change from a direct data source (used more for development) and set the database up instead as an ODBC data source. That got rid of the "Incorrect syntax error near ?"

2 0
replied on June 29, 2018

What type of connection are you using for the database... ODBC or Direct? That will change whether you need to use '?' or named parameters for your query.

1 0
replied on June 29, 2018

Just regular ODBC.  

0 0
replied on June 29, 2018

What is the data type of the boxnumber column in the DB?  Set the custom query parameter data type to match.

0 0
replied on June 27, 2018

You're not specifying a value. "ColumnName equals blank" is not a valid criterion for SQL. If you're trying to look for the ones without a value, you'd need "ColumnName is null'.

0 0
replied on June 27, 2018

Right, I didnt fill it in for the screenshot.

0 0
replied on June 27, 2018

Have you tried changing the Type value from Default to Int32?

0 0
replied on January 9

Switching the connection to ODBC worked perfectly for me.  thanks!!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.