Hi Rolf,
i didn't notice that restriction before (but just found that DISTINCT is similar), it's really annoying :-(
I don't understand why it's not allowed as it always has to build a spool first to sort the data, you might do an enhancement request.
As a workaround i would suggest a temporary table, Volatile or Global Temp depends on your needs. And this might even have an advantage when you need the same WITH more than once within your session :-)
Hi Rolf,
i didn't notice that restriction before (but just found that DISTINCT is similar), it's really annoying :-(
I don't understand why it's not allowed as it always has to build a spool first to sort the data, you might do an enhancement request.
As a workaround i would suggest a temporary table, Volatile or Global Temp depends on your needs. And this might even have an advantage when you need the same WITH more than once within your session :-)
Dieter