Skip to content

definition repeatedly opens when calling a stored procedure #396

Closed
@WBSpmichal

Description

@WBSpmichal

in certain circumstances, when I am call a custom stored procedure, it will open the definition for that stored procedure in another tab.

steps to reproduce:

  1. Create a stored procedure
  2. in the same file, add the code to call the stored procedure.
  3. Place the cursor somewhere within the line that calls the stored procedure (NOT selecting the entire line)
  4. Run the SQL with Ctrl + R

Image

The issue does not occur when running the code from the run menu, or if you manually highlight the entire line.

create or replace procedure TESTING.sp_json_test(IN json_input CHAR(5000))  
    --program type sub modifies sql data
    LANGUAGE SQL
    DYNAMIC RESULT SETS 1
    --set option usrprf = *user, dynusrprf = *user, commit = *none
begin   

    DECLARE stmt VARCHAR(200);
    DECLARE PLITM CHAR(25);
    DECLARE cur CURSOR WITH HOLD FOR s1;
    

    SET PLITM = JSON_VALUE(json_input, 'PLITM');
    --SET PLITM = 'ABS1013';

    set stmt = '
        SELECT
            PLITM,
            PSHORTDESC
        FROM
            F55WB41PRD
        WHERE
        PLITM = ?
        LIMIT 1000
    '
    ;

    PREPARE s1 FROM stmt;

    OPEN cur USING PLITM;

    CLOSE cur;
end;

CALL TESTING.sp_json_test('{"PLITM": "ABS1013"}');

this is just the example that I was testing with, but the contents of the stored procedure dont seem to matter, it has done this with other stored procedures I have created.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions