SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
The "Local Variables" section disappears

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
The "Local Variables" section disappears
Author Message
johnblaze



Joined: 12 Oct 2011
Posts: 2
Country: Russian Federation

Post The "Local Variables" section disappears Reply with quote
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.

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.

Code:

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 ...

Code:

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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.