"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’

–DECLARE @TEST VARCHAR(30);
–SET @TEST = ‘TOAD’;

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 : http://screencast.com/t/fz0kBlT5

Please let me know how to handle this.

Thanks

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

Valentine,

it’s 5.0.2.612 Freeware

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

edit;

Just installed Beta 5.6.0.300 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

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

test

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.

http://paste.pocoo.org/show/467254/

Action.log only shows normal entries from today