Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Execute Immediate and bind variables

Re: Execute Immediate and bind variables

From: Matthias Kleinicke <Matthias.Kleinicke_at_gmx.de>
Date: Wed, 10 Aug 2005 23:47:09 +0200
Message-ID: <ddds4k$ntc$1@online.de>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US