Toad World® Forums

Bug with model clause and bind variables...?

I’ve got an example query that I’m trying to run in the editor in Toad v10.0:

with my_tab as (select 1 id, 100 cnt from dual union all

select 2 id, 30 cnt from dual union all

select 3 id, 40 cnt from dual union all

select 4 id, 5 cnt from dual union all

select 5 id, 6 cnt from dual union all

select 6 id, 99 cnt from dual union all

select 7 id, 1 cnt from dual union all

select *

from my_tab mt

model

partition by (:threshold threshold)

dimension by (id)

measures (cnt, 0 cumulative_count, 1 grp)

(cumulative_count[any] order by id = cnt[cv()] + case when cnt[cv()] > cv(threshold) then

1/0

when cnt[

select 8 id, 1 cnt from dual)

I can reproduce this in the current beta as well. I’ll take a peek at it.

Thanks,

Michael

I can confirm this is still an issue in v11.0.0.116

Our parser has no support for the MODEL clause at this time. The issue was
logged on 7/14 when it was reported and the item still has a status of open in
our tracking system. I don’t have a timeframe on when it will be addressed at
this time, but I do know that the parser team is working on many improvements
for their next major upgrade so it’s possible that they’ve been holding off for
that.

Michael

Ok, thanks for the update.

Thankfully, I don’t have to touch the model clause very often! *{:wink: