cancel
Showing results for 
Search instead for 
Did you mean: 

equivalent for execute immediate command in maxdb

Former Member
0 Kudos

hi all,

like in oracle for executing the sql_query, we have execute immediate command.

for e.g.. in oracle

L_SQL ='SELECT * FROM EMP';

EXECUTE IMMEDIATE L_SQL;

what will be the command for execute immediate in MaxDB??

like in MaxDB

L_SQL = 'SELECT * FROM EMP';

Now How can i execute the above l_sql variable in MaxDB.

thanks, Bhupinder

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hi,

this depends on the DB interface, so could you please tell us what DB interface do you use, JDBC, ODBC, Precompiler etc.? Or did you mean DB Procedures?

Best regards,

Marco

Former Member
0 Kudos

Hi Marco,

well i want to execute the statament in the DB proc so for that am asking equivalent to execute immediate command.

please help me out

thanks, Bhupinder

0 Kudos

Hi Bhupinder,

the following code snippet should do the job

[code]

CREATE DBPROC EXAMPLE

AS

VAR statement1 char(100);

SET statement1 = 'SELECT * from DBA.DUAL';

TRY

EXECUTE statement1;

CATCH IF $rc <> 100

THEN STOP ($rc, 'unexpected error');

[/code]

Best regards,

Marco