Toad World® Forums

"Toad Script" Failure and T-SQL Variable

I’m trying to use ‘Toad Script’, in this case to set table owner:

– TOAD: SET owner = ‘dw’


select count(*) from {{Unquote(:owner)}}.TDMA_DIM_N_TDAY ;

It works as is — but if Line#2,3 are uncommented, i.e. declaring T-SQL variables
the statement fails : “Error: Invalid object name ‘.TDMA_DIM_N_TDAY’”

Here is my recording :

Please let me know how to handle this.


What’s your toad version?
Just checked on the latest beta similar syntax - works well to me.


it’s Freeware

In your test, is your table owner ‘dbo’ ? this problem I described does NOT come up when the owner is ‘dbo’


Just installed Beta and tried.
It works fine. That error didn’t come up.
Funny thing is , on the first run, the very FIRST query in this Beta ever (that one I posted above) - Beta crashed right out LOL

Still I’d like to know if thereis a workaround or fix for the Freeware

Message was edited by: Jeffy


I’ve used non dbo owned tables.

I will try to find workaround for 5.0.2

Re crash - can you please go in 5.6 beta to Help -> About -> Application Data Directory (link at the right bottom corner). Can you send these to files from that directory: Action.log and ExceptionTrace.log


hi Valentine,

From ExceptionTrace.log, this is the first exception that shows “Stack trace” from around the time of the crash-on-first-sql-after-install.

Action.log only shows normal entries from today