Home » SQL & PL/SQL » SQL & PL/SQL » Procedure type definition (10.2.0.4.0 ,windows)
Procedure type definition [message #440310] Fri, 22 January 2010 06:27 Go to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member

Hi all,

Can somebody explain the use/difference of below procedures?

1.CALL bala.proc1(argument1,argument2,argument3,argument4...);

2.execute procedure('argument');

Regards,

Re: Procedure type definition [message #440311 is a reply to message #440310] Fri, 22 January 2010 06:29 Go to previous messageGo to next message
cookiemonster
Messages: 13965
Registered: September 2008
Location: Rainy Manchester
Senior Member
Do you mean the use of call and execute or something else?
Re: Procedure type definition [message #440314 is a reply to message #440310] Fri, 22 January 2010 07:02 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Everything is clearly explained in the documents provided by Michel and me in your previous posts...

I don`t whats not clear for you as you are asking for more details...
I am posting the source here once again for you please read that syntax and explanation it has come back here if it is not clear.

Call AN SQL Command

EXECUTE AN SQL*PLUS COMMAND

Good luck Smile

sriram Smile

[Updated on: Fri, 22 January 2010 07:05] by Moderator

Report message to a moderator

Re: Procedure type definition [message #440315 is a reply to message #440310] Fri, 22 January 2010 07:02 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
SQL> create or replace procedure p is begin null; end;
  2  /

Procedure created.

SQL> exec p;

PL/SQL procedure successfully completed.

SQL> call p;
call p
     *
ERROR at line 1:
ORA-06576: not a valid function or procedure name

SQL> call p();

Call completed.

In the short way, just a difference in syntax.

Regards
Michel

[Updated on: Fri, 22 January 2010 07:04]

Report message to a moderator

Re: Procedure type definition [message #440316 is a reply to message #440315] Fri, 22 January 2010 07:04 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
due to the network error MY message got wrong definition there Please edit

CALL sql command.
Execute Sql* plus command.

sriram Smile
Re: Procedure type definition [message #440317 is a reply to message #440316] Fri, 22 January 2010 07:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Done.

Regards
Michel
Re: Procedure type definition [message #440318 is a reply to message #440315] Fri, 22 January 2010 07:06 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
i am sure Quote:
In the short way, just a difference in syntax.


exec is an sql * plus command.

And CALL is an sql command.

sriram Smile
Re: Procedure type definition [message #440319 is a reply to message #440318] Fri, 22 January 2010 07:07 Go to previous messageGo to next message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Thank you.

sriram Smile
Re: Procedure type definition [message #440321 is a reply to message #440316] Fri, 22 January 2010 07:10 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Yes but:
SQL> begin 
  2    call p();
  3  end;
  4  /
  call p();
       *
ERROR at line 2:
ORA-06550: line 2, column 8:
PLS-00103: Encountered the symbol "P" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "P" to continue.

So could be thought both as SQL*Plus comands.
(Or better forget CALL, it is just misleading.)

Regards
Michel
Re: Procedure type definition [message #440323 is a reply to message #440321] Fri, 22 January 2010 07:15 Go to previous message
ramoradba
Messages: 2457
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Yes no need of CALL (we can ignore in that case)....

ind> call p();

Call completed.

ind> ed
Wrote file afiedt.buf

  1  begin
  2        call p();
  3*     end;
  4  /
      call p();
           *
ERROR at line 2:
ORA-06550: line 2, column 12:
PLS-00103: Encountered the symbol "P" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "P" to continue.


ind> ed
Wrote file afiedt.buf

  1  begin
  2        p();
  3*     end;
ind> /

PL/SQL procedure successfully completed.


SO Mr Hitman Better read the documents..which are provided for each and every post of you....

Good luck

sriram Smile

[Updated on: Fri, 22 January 2010 07:18]

Report message to a moderator

Previous Topic: Type defined inside a type ?
Next Topic: how to write INLINE SUM to this query
Goto Forum:
  


Current Time: Fri Feb 14 16:38:38 CST 2025