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: First attempt with Dynamic SQL

Re: First attempt with Dynamic SQL

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Sat, 17 Apr 2004 22:49:36 +0100
Message-ID: <5f9380pa2b56s66o6qm7so9r0komglhelv@4ax.com>


On Sat, 17 Apr 2004 20:05:55 +0200, Marc Eggenberger <nw1_at_devnull.ch> wrote:

> OPEN Config_Cursor FOR
> 'SELECT * FROM tblProbe_' || v_Name || 'WHERE ProbeID =
>' || intProbeID;
>
> RETURN Config_Cursor;
>END;
>/
>
>This compiles but when executed I get
>ORA-00933: SQL command not properly ended
>ORA-06512: at "NETPROBE.SP_GETPROBECONFIG", line 13
>
>What am I doing wrong here?

 The immediate problem is that you're missing a space between the end of the table name and the WHERE clause.

--
Andy Hassall <andy_at_andyh.co.uk> / Space: disk usage analysis tool
http://www.andyh.co.uk         / http://www.andyhsoftware.co.uk/space
Received on Sat Apr 17 2004 - 16:49:36 CDT

Original text of this message

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