Hi. I have an auto script where I have defined a prompt variable (:file_date) in the "Set Variable" task. This is the first task in my script. (I am using a string variable).
In my sql statement, the where clause is " where to_char(add_dtm,'%Y-%m-%d') = :file_date".
If I run the task "Select to File", I enter the prompt var and the task creates an output file.
But if I try to publish the results of the query as a dataset to TIC, in the publish wizard I get an error "cannot publish statement with undefined variables for this type" next to the "publish type" (which is pre-set to dataset).
I'm not sure what is incorrect as the variable has been defined in the "Set Variable" task.
UPDATE: I found a script where I had previously done this. I ran it and it works. However, when I click on the Publishing Wizard, I get the error. Is this a bug that was introduced in a recent release?
Hi John,
Thank you for the detailed explanation. To help us investigate this further, could you please confirm:
- which version of Toad you were using when the script worked as expected (without the error in the Publishing Wizard), and
- which version you are currently using where you’re seeing this issue?
This will help us compare the behavior and determine if this might be a regression.
Appreciate your help!
Hi @john.coniff
I tried to reproduce the issue using an Oracle data source (assuming that’s what you're working with), but the issue didn’t occur on my side.
Could you please provide the following:
- The exact data source you're using
- The version of TDP used when the script originally worked, and the version where you’re now seeing the issue
- The DDL for the table in question
- Sample queries used in the automation steps
- Clear steps or a sample script that consistently reproduces the issue
For quicker analysis and resolution, I recommend opening a support case and including all relevant details: Create Technical Case
We’ll be happy to assist further once we have more information.
Hello, I created a ticket with Quest and they got me going. I had to first create a version of the script that wrote to TIC with a hard-coded value (not a variable). Then, I updated my job to use the variable, bypassing the publishing the results of my query to TIC. Maybe it's a work-around from what I did in the past? At any rate, I'm back in business. (I am using a generic ODBC connection with an Informix database).
1 Like