 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
johnblaze
Joined: 12 Oct 2011 Posts: 2 Country: Russian Federation |
|
The "Local Variables" section disappears |
|
I am using Oracle 11g database and SQL Assistant 6.0.70.
Text editor - Notepad ++
The "Local Variables" section disappears after "case...end;" statement.
For example, try to type the following block of code.
 |
 |
1 declare
2 i integer;
3 b integer;
4 begin
5 b := 1;
6 i := case b
7 when 1 then 5
8 else 10
9 end;
10
11 end;
12 /
|
When we invoke SQL Assistant window (Ctrl+Space) anywhere at the lines 4-8 or at the line 9 before keyword "end;" then the "Local Variables" section is in the list and it shows two variables, i and b. But when we invoke the window after the "end;" keyword (for example, at the line 10) then the "Local Variables" section is not in the list (if we commented the line 9 then the "Local Variables" section will be shown again).
It seems that SQL Assistant treats the "end;" keyword as the end of PL/SQL block and not the end of the case statement.
The same problem takes place when we use local subprograms in a PL/SQL block.
Please find the example below.
 |
 |
1 declare
2 i integer;
3 b integer;
4
5 function f( p in integer )
6 return integer
7 is
8 begin
9 return p;
10 end f;
11
12 begin
13 b := 1;
14
15 end;
16 /
|
When we try to invoke SQL Assistant after line 10 the "Local Variables" section is not displayed.
But on nested PL/SQL blocks everything works fine ...
 |
 |
1 declare
2 i integer;
3 b integer;
4 begin
5 b := 1;
6 begin
7 i := 10;
8 end;
9
10 end;
11 /
|
|
|
Thu Oct 13, 2011 3:34 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Thank you. This looks like a bug to me. I was able to reproduce it locally; I will submit a new bug report.
|
|
Thu Oct 13, 2011 10:10 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|