To execute SQL create query's and pl/sql scripts i use TSQLScript.
For example when i want to use a create query i use something like this:
begin
execute immediate
'
create table tijd_ctrl_overlap
(
BRON
, OBJECT_GUID
, ID
, STD_TYPE
, TYPE
, GEOMETRIE
)
as
select
''TABLE_A''
, object_guid
, id
, std_grtype
, grtype
, Geometrie
from
TABLE_A
union all
select
''TABLE_B''
, object_guid
, id
, std_n_type
, nl_type
, Geometrie
from
TABLE_B
';
exception
when others then
if sqlcode != -955 then
raise;
end if;
end;
^
Now i want to excecute the next sql statement which calls a package
(It works in Oracle)
BEGIN
pack_sp10.pr_register_spatial_layer('TIJD_CTRL_OVERLAP',28992);
END;
/
I tried this but is not working, the program stops working with no warning.
begin
execute immediate
'
begin
pack_sp10.pr_register_spatial_layer(''TIJD_CTRL_OVERLAP'',28992);
end;
';
end;
^