cancel
Showing results for 
Search instead for 
Did you mean: 

DDL - write more store procedures at once

0 Kudos

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.

pfefferf
Active Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

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.

lbreddemann
Active Contributor
0 Kudos

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 Kudos

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;