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 -> Re: ORA-00600 Dynamic SQL Problem...

Re: ORA-00600 Dynamic SQL Problem...

From: Rick Wessman <Rick.Wessman_at_oracle.com>
Date: 15 Oct 2001 09:48:06 -0700
Message-ID: <sock7xwdf3t.fsf@rwessman-sun.us.oracle.com>


Hi:

By definition, an ORA-600 error is a bug. The best thing to do would be to contact Oracle support.

                                       Rick

tjm_at_geac.dk (tIM) writes:

> Hi!
>
> Here is what I am trying to do in words...
> I loop through table that has a default supplier field containing
> 1,2,3,4 or 5..
> If the value is 1 I want field supplier1 if the value is 2 I want
> supplier2.
>
> While typing this I just thoght of using decode... So I'll give this a
> try but
>
> I still want to post this cause it could be a bug on 9i NT?
>
> you can use this code to reproduce the error 00600:
>
> DROP TABLE TEMP;
> DROP TABLE TEMP_TEMP;
>
> CREATE GLOBAL TEMPORARY TABLE TEMP_TEMP (xxx number(1));
> CREATE TABLE TEMP (xxx number(1));
> INSERT INTO TEMP VALUES (1);
> INSERT INTO TEMP VALUES (2);
>
> DECLARE
> l_sql varchar2(400);
> BEGIN
> for x in (select xxx from temp)
> loop
> l_sql:='INSERT INTO TEMP_TEMP (xxx) values (:x.xxx)';
> EXECUTE IMMEDIATE l_sql;
>
> end loop;
> END;
>
> the reason I need to do this is stated above again here is the real
> code I was trying to do... Does anyone else get this error on other
> platforms?
>
>
> for x in (select ST.KEY1,ST.KEY2,ST.KEY5,
> ST.MOM001,ST.MOC038,ST.PICTMODA01,
> ST.MOC010,MA.MOC010TXT,ST.MOC007,ST.RECNO,
> ca.defsup,CA.Supplier1,ca.supplier2,ca.supplier3,ca.supplier4,
> ca.supplier5,ca.article,ca.quality1,ca.quality2,ca.quality3,ca.quality4,
> ca.quality5,ca.color,'N' BEH
> FROM STYLES ST,MAINSTNO MA,CATALOG CA
> WHERE ST.MAINKEY=p_mainkey
> AND ST.MOC010=MA.MOC010(+)
> AND ST.MAINKEY=CA.MAINKEY(+)
> order by ca.lineno)
> loop
>
>
> l_sql:='INSERT INTO TEMP_INTEGRATION_OUT (StyleNo,Program,
> Season,Description,ProdGroup,StylePict,SizeRangeCode,SizeRange,
> Mark,Quality ,Supplier,Color,recno,beh,intdate)
> values (:x.key1,:x.key2,:x.key5,:x.mom001,:x.moc038,:x.pictmoda01,
> :x.moc010txt,:x.moc010,:x.moc007
> ,:x.quality'||to_char(x.defsup)||
> ',:x.supplier'||to_char(x.defsup)||',:x.color,
> :x.recno,:x.beh,sysdate)';
>
> insert into temp values(l_sql);
> EXECUTE IMMEDIATE l_sql;
>
> end loop;

-- 
                                Rick Wessman
                                Security Assurance Group
                                Oracle Corporation
                                Rick.Wessman_at_oracle.com

     The opinions expressed above are mine and do not necessarily reflect
                         those of Oracle Corporation.
Received on Mon Oct 15 2001 - 11:48:06 CDT

Original text of this message

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