Prompted queries (follow up question)

This is a follow up question regarding the use of prompted queries. I apologize if this is a duplicate message. I’m new to the site so I didn’t know if my last question got sent.

I have one follow up question and a new question I would like ask.

1 - I was able to alter one of my queries and got the prompting to work as you instructed. However, when I try this same technique with an ODBC connection in Toad I get an error message that reads "The Host variable “my column name” is used in a dynamic SQL statement, a view definition, or a trigger definition. SQLSTATE=42618.

Have you ever experienced this? If so, is there a way to fix this so the prompts will work with this type of connection?

2 - I have some shared queries that I created where I added comments to explain what the query does plus there are several filter options the users can turn on or off depending on their data needs. When we try to run those queries in Toad, it returns an error of:

"ERROR [56038] [IBM][CLI Driver][DB2] SQL0969N There is no message text corresponding to SQL error “-4700” in the message file on this workstation. The error was returned from module “DSNHTOKR” with original tokens ‘’’’. SQLSTATE=56038.

Are there any settings I may need to change to allow Toad to recognize that these extra lines in my SQL statements are comments?

Any information you can provide would be appreciated.

Thank you .

  1. Having “binds” is actually that also need to be supported by your
    ODBC driver. One thing you could try is using the unnamed ? bind
    parameter and see if that works.

  2. Having comments is also something that is database specific. The most
    generic comment is probably the – character. What kind of comment are
    you using?


Thanks for the reply.

In response to your “comment” question, I am using are either – (for a single line)


/* (for a multi line comment) */

I think the – comment is pretty universally supported, but the /* */
comments I am pretty sure are dependent on which SQL dialect you are
using. Also some databases (DB2 for instance) do not support having
comments inside statements, but only between them.