Skip to Content

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


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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 23, 2018 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.


    Add comment
    10|10000 characters needed 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.