Skip to Content
0

DDL - write more store procedures at once

Feb 05 at 04:08 PM

55

avatar image
Former Member

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.

10 |10000 characters needed characters left 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).

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

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

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.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

You might want to post an actual example that shows the error you face.

From the description you provided, I don't even understand what the issue is.

BTW: deploying db objects like procedures via a .sql script is not the recommended way. You may find the repository objects more comfortable to deal with (check the developer guides on that).

0
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;

0