Home » SQL & PL/SQL » SQL & PL/SQL » Program Header (Oracle 10g)
Program Header [message #445620] Tue, 02 March 2010 23:36 Go to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Is there any difference between include program header before CREATE OR REPLACE PACKAGE statement and program header after CREATE OR REPLACE PACKAGE statement

[Updated on: Tue, 02 March 2010 23:39]

Report message to a moderator

Re: Program Header [message #445623 is a reply to message #445620] Wed, 03 March 2010 00:24 Go to previous messageGo to next message
Michel Cadot
Messages: 63807
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Which program header? What is it? Show an example.

Regards
Michel
Re: Program Header [message #445625 is a reply to message #445623] Wed, 03 March 2010 00:46 Go to previous messageGo to next message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Sample Program Header

-- *****************************************************************
-- Description: Describe the purpose of the object. If necessary,
-- describe the design of the object at a very high level.
--
-- Input Parameters:
--
-- Output Parameters:
--
-- Error Conditions Raised:
--
-- Author: <your name>
--
-- Revision History
-- Date Author Reason for Change
-- ----------------------------------------------------------------
-- 03 JAN 2007 J.Schmoe Created.
-- ****************************************************************
Re: Program Header [message #445627 is a reply to message #445625] Wed, 03 March 2010 00:53 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
If you would have just tried it, you would have noticed that any comment that you put BEFORE the "create or replace" does not get included in the source. That means that if you later want to edit the source, the comment is gone:
SQL> get tst.sql
  1  /*
  2   * This is my test package
  3   */
  4  create or replace package test_package
  5  is
  6    procedure test_it;
  7* end test_package;
SQL> /

Package created.

SQL> select text from user_source where name = 'TEST_PACKAGE' order by line;

TEXT
--------------------------------------------------------------------------------
package test_package
is
  procedure test_it;
end test_package;

SQL> get tst2.sql
  1  create or replace package test_package
  2  /*
  3   * This is my test package
  4   */
  5  is
  6    procedure test_it;
  7* end test_package;
SQL> /

Package created.

SQL> select text from user_source where name = 'TEST_PACKAGE' order by line;

TEXT
--------------------------------------------------------------------------------
package test_package
/*
 * This is my test package
 */
is
  procedure test_it;
end test_package;

7 rows selected.
Re: Program Header [message #445630 is a reply to message #445620] Wed, 03 March 2010 01:01 Go to previous message
spmano1983
Messages: 269
Registered: September 2007
Senior Member
Thanks you frank.
Previous Topic: Need Assistance On PL/SQL Coding
Next Topic: query help
Goto Forum:
  


Current Time: Wed Sep 28 12:36:54 CDT 2016

Total time taken to generate the page: 0.08909 seconds