I tried 11.0 and I see that the variable is prompted for (as you mentioned), however, I get an error when actually trying to run it - same for in SQL Plus.
The problem is the ‘IGNORE’ - it’s expecting an offset there. I’m not sure how this worked in SQL Plus for you when you ran it - at least, I wasn’t able to replicate it.
The only way I could make it work was to remove the IGNORE and replace it with the offset, which is the what the LEAD function expects. When you do this
in Toad, then the bind variable shows up correctly, because it’s valid syntax.
SELECT LEAD
(dummy,1)OVER(ORDER
BY dummy
DESC)
from dual
where dummy
:var;
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions074.htm
From: Anjali_Sharma [mailto:bounce-Anjali_Sharma@toadworld.com]
Sent: Wednesday, January 21, 2015 7:21 AM
To: toadoracle@toadworld.com
Subject: [Toad for Oracle - Discussion Forum] TOAD throws warning, code executes in SQL PLUS
TOAD throws warning, code executes in SQL PLUS
Thread created by Anjali_Sharma
Hi,
I have a strange situation. I am running below mentioned code from 2 TOAD versions:
SELECT LEAD (dummy IGNORE NULLS)OVER(ORDER BY dummy DESC) from dual where dummy = :var;
a. Toad for Oracle 12.6.0.53
b. Toad for Oracle Xpert Trial 11.0.0.116
In version a I get warning and when i try to run code it does not show bind variable in pop up. I have attached screenshot for same.
In version b, it shows warning but shows bind variable in pop up and runs fine.
Why am I getting this warning even if code is working fine from SQL plus?
Thanks,
Anjali
Anjali.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.