Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: First attempt with Dynamic SQL
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/spaceReceived on Sat Apr 17 2004 - 16:49:36 CDT