Home » SQL & PL/SQL » SQL & PL/SQL » error message : Warning: compiled but with compilation errors (xp windows)
error message : Warning: compiled but with compilation errors [message #376736] Thu, 18 December 2008 07:02 Go to next message
kapusta117
Messages: 4
Registered: December 2008
Junior Member
Hello

I have tested a simple procedure pl sql in toad But i have this error message : Warning: compiled but with compilation errors.


This is the script i executer in toad :
CREATE OR REPLACE PROCEDURE PR_ALIM_TERMID AS
    i   NUMBER(15) :=0 ;
BEGIN
    FOR C_CSTMCD IN (SELECT CSTM_CD FROM CSTMR2
               MINUS 
             SELECT CSTM_CD FROM TERMID2
                        )
    LOOP 
        INSERT INTO TERMID2 (CSTM_CD,TERMNA_ID,TERMNA_TYP,HIST_NO,KEY_QTY,AST_LINE,AMD_DATE)
            
        VALUES (c_CSTMCD.CSTM_CD, max(TERMNA_ID + i), 1,sysdate ,sysdate);
        i:=i+1;
        
   END LOOP;
END;
/


In fact i tried to export data from table cstmr2 to table TERMID2
when data in cstmr2 doesnt exist in table termid2.

sorry for my basic english.

thank to help me on this subject ..i'm beginning in pl sql and toad.

Carfully
Re: error message : Warning: compiled but with compilation errors [message #376738 is a reply to message #376736] Thu, 18 December 2008 07:18 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I have tested a simple procedure pl sql in toad But i have this error message

quoting Ana (anacedent):
Those who live by the GUI, die by the GUI.


Use SQL*Plus and "show errors".

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and use code tags.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel

[Updated on: Thu, 18 December 2008 07:18]

Report message to a moderator

Re: error message : Warning: compiled but with compilation errors [message #376739 is a reply to message #376736] Thu, 18 December 2008 07:22 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
kapusta117
In fact i tried to export data from table cstmr2 to table TERMID2 when data in cstmr2 doesnt exist in table termid2.

Well, you don't need PL/SQL to do that - SQL is capable of doing that job.

But, if you are just trying to learn something about PL/SQL loops, go ahead!
Re: error message : Warning: compiled but with compilation errors [message #376746 is a reply to message #376736] Thu, 18 December 2008 07:50 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
One thing I see is that the number of values does not match the number of named columns.
Re: error message : Warning: compiled but with compilation errors [message #376856 is a reply to message #376746] Thu, 18 December 2008 22:40 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Hi,

First of all, you use SHOW ERROR to view what was the mistake.
Try to solve.
If you can't come back with that problem.

regards,
Delna
Re: error message : Warning: compiled but with compilation errors [message #376868 is a reply to message #376736] Fri, 19 December 2008 00:19 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
Problem with


MAX (termna_id + i)


Thanks
Trivendra
Re: error message : Warning: compiled but with compilation errors [message #376882 is a reply to message #376868] Fri, 19 December 2008 00:51 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
winthin max use select clause to find the termna_id or
if you are using generated sequence use nextval . Also i assume your terma id is numeric type
yours
dr.s.raghunathan
Re: error message : Warning: compiled but with compilation errors [message #377357 is a reply to message #376736] Mon, 22 December 2008 08:46 Go to previous message
kapusta117
Messages: 4
Registered: December 2008
Junior Member
Hello

I have created sequence and used nextval. It works good.

Thank you for all members who helped me.

Take care.
Kapusta
Previous Topic: Distributed Names
Next Topic: Path dependend case-statement (merged 3)
Goto Forum:
  


Current Time: Fri Dec 09 19:18:00 CST 2016

Total time taken to generate the page: 0.16551 seconds