Skip to Content
0

exception: sql syntax error: database name not allowed in single-container mode

Mar 13, 2017 at 05:13 PM

1.1k

avatar image
Former Member

Dear Colleagues ,

I need your esteemed guidance to fix this issue.

i was trying to run a procedure , with three arguments that holds the HDBDD table names in parameters and when i run it , it throws me error.

I tried to call this procedure

CALL "schema"."location.loc::MIGRATION_MP"( 'schema.location.loc::T1.tb_TT', 'schema1.location.loc::t1.tb_TT', 'schema1.location.loc::t1.a_TT');
so i am calling the procedure with the table name to insert data in to a table in another schema. where i am passing condition in insert where the selected column entry has the input of another table activity(corresponding table name)

Your support is greatly appreciated.

procedure "SCHEMA"."Location::MIGRATION_MP"(
 in T_TARGET nvarchar(254),in T_LEGACY nvarchar(254) , in v_interface VARCHAR(254)
) LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
DEFAULT SCHEMA "SCHEMA"
AS
BEGIN exec('insert into ' || :T_TARGET || ' select * from ' || :T_LEGACY);insert into  "schema::T1.TT"  select * from  "schema1::T1.TT" where "Column" = :v_interface;
END;




10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Mar 15, 2017 at 11:50 PM
1

I solved this issue, the deal is we need to use concatenation || operator. also need to add "" after and before each column .

i.e || " || column1 || " ; something like this . thanks i think it could help u ...

Br,

Gabriel.

Share
10 |10000 characters needed characters left characters exceeded
Dilip Deenadayalan Mar 28 at 01:05 PM
0

Hi Rajan ,

One question !!!!

exec 'set schema '||:schema_name;

exec('CREATE VIEW ' || schema_name || '.' || view_name || ' AS (' || view_definition || ')');

Can we execute the above commends in one exec ?? also where should i add the double quotes as i am getting the same error "

database name not allowed in single-container mode" Thanks

Share
10 |10000 characters needed characters left characters exceeded