Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Execute Immediate and bind variables
Hi Chris,
brightspot schrieb:
> I'm translated SQL Server stored procedures into Oracle. We used
> sp_executesql before and I'm trying to use Execute Immediate to mimic
> the previous code. Here's my problem:
>
> The schema name is passed into the stored procedure. We concatenate the
> schema name to the table name and then do some selects and updates to
> the table based on the particular schema we're working on. For example:
>
> Execute Immediate 'SELECT ' || SCHEMA_NAME || '.theTableName.theField
> AS THE_FIELD, ' || ... etc
>
whats the point in replacing the parameter with anythig else?
a bind variable is a placeholder for a value. so
you can only replace constants. tablenames and keyword can not substituted.
greetings
Matthias
Received on Wed Aug 10 2005 - 16:47:09 CDT
![]() |
![]() |