Prompted queries


I was wondering if TDA is able to support prompted queries. I have been using QMF for several years and that query tool allowed you to write queries and insert a variable that would prompt the user to enter a value for the desired search (filter) they wanted to query on.

I could not locate any information in the help files so I thought I would ask the experts. Any information you can provide would be appreciated.


Yes we do. Just type a :fieldname an you will be prompted for the value
when you run the query.


Thank you.

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 .

Hello, the questions in your last post were answered in the other thread that you started on the same topic.