Skip to Content
avatar image
Former Member

DDL - write more store procedures at once

We don't know any way, how we can write more store procedures at once.

In eclipse we can only write store procedure one by one.

Add comment
10|10000 characters needed characters exceeded

  • Please can you add some more details to your question to make it more clear? Are you asking how you can work in parallel on different procedures which are related to each other (e.g. one procedure calls another one)? In XS Classic (as you are talking about Eclipse), you can get in dependency issues during activation (even if you activate all procedures together).

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Feb 06 at 09:39 AM

    I have ddl.sql file where are multiple procedures, for example:

    create procedure proc1(...) begin ... end;

    create procedure proc2(...) begin ... end;

    ...

    create procedure procN(...) begin ... end;

    But in Eclipse (in SQL Console) it ends with errors. It works if I create JUST SINGLE STORED PROCEDURE IN ONE SQL COMMAND. But I need to create multiple procedures in single DDL script.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      We think, this problem is in statement CASE. In Eclipse (in SQL Console) this example always ends with errors:

      drop procedure save_log_1;

      create procedure save_log_1(v_origin varchar(255), v_value varchar(5000)) as

      CURSOR c_cursor1 (p_nid integer) FOR

      select case dummy when 'X' then 1 else 2 end from dummy;

      begin insert into debug_log(date, origin, value) values ((select current_timestamp from dummy), v_origin, v_value);

      end;

      drop procedure save_log_2;

      create procedure save_log_2(v_origin varchar(255), v_value varchar(5000)) as

      begin

      insert into debug_log(date, origin, value) values ((select current_timestamp from dummy), v_origin, v_value);

      end;