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

Home -> Community -> Usenet -> c.d.o.server -> PL/SQL - Dynamic SQL

PL/SQL - Dynamic SQL

From: Detlev Goebel <goebel_at_www.gzs.de>
Date: Wed, 03 Feb 1999 10:40:28 +0100
Message-ID: <36B8198B.F637A4BC@www.gzs.de>


Hello all

I'm in need to create a stored procedure with dynamic sql.

The query looks like that :

sql_str = 'select col1, col2 from ' || table_name || ' where col3 = ' || char_var

The Problem: There are no single quotes at var_char and dbms_sql.parse pops up an error message
saying invalid column name. Now I'm trying to get the single quotes in that string but that doesn't work so far.

Is there somone on the list who could help me ???

Detlev Goebel

GZS Gesellschaft für Zahlungssysteme m.b.H.

Theodor Heuss Allee 80

60486 Frankfurt

Tel.: +49 (0) 69 7933 1097
Fax : +49 (0) 69 7933 1940

mailto:goebel_at_www.gzs.de
mailto:detlev.goebel_at_gzs.de

http://www.gzs.de


Received on Wed Feb 03 1999 - 03:40:28 CST

Original text of this message

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