Skip to Content

Using table variable in a derived table raises 225 error if statement cache enabled

Apr 23 at 06:41 AM


avatar image


SAP ASE 16.0 SP03 PL02

1> declare @t table (a int)
2> insert into @t values (10)
3> select * from (select * from @t) t
4> go
(1 row affected)
Msg 225, Level 16, State 1:
Server 'ASE1603', Line 3:
Cannot run query--referenced object (name NAME NOT RECOVERABLE) dropped during query optimization.

This error doesn't occur when statement cache is disabled.
Could you check this behavior?

Kazuo Otani

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Bret Halford
Apr 23 at 05:17 PM

This seems to be a previously unknown issue. I've opened CR 814700 and published KBA 2635224 on it.
You can subscribe to the KBA to be automatically notified when the CR is fixed.


Show 1 Share
10 |10000 characters needed characters left characters exceeded

Just to be precise, you have to "favorite" the KBA to get notifications (the star thingy in the upper right). Not trying to be annoying, just helpful.