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: HELP WITH DYNAMIC SQL (DBMS_SQL PACKAGE)

Re: HELP WITH DYNAMIC SQL (DBMS_SQL PACKAGE)

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 2 Dec 1999 12:29:48 -0000
Message-ID: <944137900.10883.0.nnrp-04.9e984b29@news.demon.co.uk>


You have 3 quotes in a row around %COUNTRY% when you need to have 2.

Unless the datTableName includes a leading and trailing quote, I think you will also need to say:

 ..... TABLE_NAME= ''' || datTableName || ''''

(three quotes after the =, and 4 quotes at the end.

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

    gndiving wrote in message <824ii50rsc_at_enews3.newsguy.com>...     I am trying to create a query with the DBMS_SQL package. Basically I =  have to update about 85 tables with a country code... My problem is = that there are about three different name for the country code(i.e. = country_cde, country_code, country)

    and even more for the state which I base the query on. the problem = is when I try to parse this statement I get an error     

    DBMS_SQL.PARSE(datCur, 'select COLUMN_NAME from all_tab_columns     where column_name LIKE ' ' '%COUNTRY%' ' ' AND TABLE_NAME= '||     datTableName,DBMS_SQL.NATIVE);     

    datTableName is passed into the program from UTL_FILE.getline     

    Dan White
    Oracle Programmer/Analyst
    dwhite_at_mail.intracorp.com Received on Thu Dec 02 1999 - 06:29:48 CST

Original text of this message

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