Home » SQL & PL/SQL » SQL & PL/SQL » Error PLS-00428: Problem creating Procedure
Error PLS-00428: Problem creating Procedure [message #248541] Fri, 29 June 2007 08:02 Go to next message
jotaod
Messages: 4
Registered: June 2007
Junior Member
Hi, somebody help me? I tried all, but i´m not very good in PLSQL.

Declare

    VPQTY varchar2(255);
    VPGRWT varchar2(255);
    
BEGIN

      VPGRWT := 'select F557620B.VPGRWT
      	From F557620B, F7601B
      	WHERE
      		F7601B.FHBNNF = F557620B.VPBNNF AND 
      		F7601B.FHBSER = F557620B.VPBSER AND 
      		F7601B.FHN001 = F557620B.VPN001 AND 
      		F7601B.FHDCT = F557620B.VPDCT AND 
      		F557620B.VPZ55NRVNF IS NOT NULL AND
          RowNum <= 1';
      
      IF VPGRWT IS NULL THEN
      		VPGRWT := 'select 
      			F554210A.VPGRWT 
      			From 
      				F554210A, F7601B, F7611B
      			WHERE
      				F7601B.FHBNNF = F7611B.FDBNNF and 
      				F7601B.FHBSER = F7611B.FDBSER and 
      				F7601B.FHN001 = F7611B.FDN001 and 
      				F7601B.FHDCT = F7611B.FDDCT AND
              RowNum <= 1';
      END IF;
      
      VPQTY := 'select 
        F557620B.VPQTY 
      	From 
      		F557620B, F7601B
      	WHERE
      		F7601B.FHBNNF = F557620B.VPBNNF AND 
      		F7601B.FHBSER = F557620B.VPBSER AND 
      		F7601B.FHN001 = F557620B.VPN001 AND 
      		F7601B.FHDCT = F557620B.VPDCT AND 
      		F557620B.VPZ55NRVNF IS NOT NULL AND
          RowNum <= 1';
      
      IF VPQTY IS NULL THEN
      	
      		VPQTY := 'select 
      		F554210A.VPQTY 
      		From 
      			F554210A, F7601B, F7611B
      		WHERE
      			F7601B.FHBNNF = F7611B.FDBNNF and 
      			F7601B.FHBSER = F7611B.FDBSER and 
      			F7601B.FHN001 = F7611B.FDN001 and 
      			F7601B.FHDCT = F7611B.FDDCT and
            RowNum <= 1';
      END IF;

		
select
  F7601B.FHBCGT, 
  F7601B.FHBCGF,	
  F7601B.FHISSU,	
  F7601B.FHBSER,	
  F7601B.FHBNNF,	
  F7601B.FHBVTN,	
  F7611B.FDUORG,	
  F76011.AIBISC, 	
  F7611B.FDLITM, 	
  F7611B.FDDSC1,	
  F0116.ALADD1, 	
  F0116.ALCTY1, 	
  F0116.ALADDZ, 	
  F0116.ALADDS,	
  F0116.ALADD4,	
  F0101.ABALPH,	
  F0101.ABTX2, 
  VPQTY,
  VPGRWT
  
FROM 
	F7601B, F0101, F0116, F557620B, F554210A, F7611B, F76011
WHERE
	F0101.ABAN8 = F7601B.FHSHAN AND
	F0101.ABAN8 = F7601B.FHFCO AND
	F0101.ABAN8 = F7601B.FHAN8 AND
	F7611B.FDDOCO = F554210A.VPDOCO AND 
	F7611B.FDPDCT = F554210A.VPDCTO AND 
	F7611B.FDKCOO = F554210A.VPKCOO AND 
	F7611B.FDLNID = F554210A.VPLNID and 
	F554210A.VPEV01 = '2';
  
  
END;


TKS FOR ALL

João Otávio
Re: Error PLS-00428: Problem creating Procedure [message #248546 is a reply to message #248541] Fri, 29 June 2007 08:16 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Break your lines to max 80-100 characters when you format.
Please always post your Oracle version (4 decimals).

Quote:
I tried all, but i&acute;m not very good in PLSQL

What did you try? Randomly writing lines of codes?

Regards
Michel

[Updated on: Fri, 29 June 2007 08:17]

Report message to a moderator

Re: Error PLS-00428: Problem creating Procedure [message #248550 is a reply to message #248546] Fri, 29 June 2007 08:24 Go to previous messageGo to next message
jotaod
Messages: 4
Registered: June 2007
Junior Member
Hi,

No i&acute;m tring to use the value from variables into the select. When my result come back, i wanna see the value from this variables too.

tks

Re: Error PLS-00428: Problem creating Procedure [message #248551 is a reply to message #248550] Fri, 29 June 2007 08:30 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First: format your post and answer the questions.

Regards
Michel
Re: Error PLS-00428: Problem creating Procedure [message #248556 is a reply to message #248551] Fri, 29 June 2007 08:35 Go to previous messageGo to next message
jotaod
Messages: 4
Registered: June 2007
Junior Member
Sorry, but i dont know how to format my post...

But, the question i already answered...

I need to show the value from variables when my select return a result.

Only this...

tks
Re: Error PLS-00428: Problem creating Procedure [message #248573 is a reply to message #248556] Fri, 29 June 2007 10:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
To know how to format the post, click on the link I posted.
You don't answer on your version number.
You don't say the purpose of your PL/SQL.
When I see a static SELECT in a variable, I'm already sure that this is bad PL/SQL code without reading anything else.

Regards
Michel
Re: Error PLS-00428: Problem creating Procedure [message #248579 is a reply to message #248573] Fri, 29 June 2007 10:55 Go to previous messageGo to next message
jotaod
Messages: 4
Registered: June 2007
Junior Member
Sorry, my version is 10g, but i guess the real version is 9i...

can i change the result from sql to xml in 9i?

tks
Re: Error PLS-00428: Problem creating Procedure [message #248581 is a reply to message #248579] Fri, 29 June 2007 11:00 Go to previous message
Michel Cadot
Messages: 64131
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
We didn't yet answer your first question you ask for another one!

Btw, I asked version on 4 decimals and you don't even know in which major version you are.
How can we answer?
Do you think answer is the same in versions that spread over the past decade?

Regards
Michel
Previous Topic: Performance of Exist and IN
Next Topic: Exists question
Goto Forum:
  


Current Time: Wed Dec 07 11:01:25 CST 2016

Total time taken to generate the page: 0.33501 seconds