Re: Procedure Builder

From: Howard Gluckman <hgluckm_at_uswest.com>
Date: 1996/10/31
Message-ID: <3279087A.14D4_at_uswest.com>#1/1


Brian Everett wrote:
>
> Is there a way to save procedures that you develop using
> Developer 2000/Procedure Builder to a .txt file without using a 3rd
> party tool? I know that their stored as objects and that Intersolv
> offers a tool for version control. However, there has got to be away
> to save your source code to a file. Thanks for your help!!!!!!!I just finished doing this! The code is:

SELECT Decode ( line, 1, '/'||chr(10)||'CREATE OR REPLACE '||text, text ) txt
FROM user_source s, user_objects o
WHERE status = 'VALID'
AND s.name = o.object_name
AND s.type = o.object_type
ORDER BY o.object_type, o.object_name, line;

The decode will place a '/<CR>' before each new object. You must delete the first one, and add a '/' to the last one (after spooling, of course). Since I'm using this to move from a test instance to a production instance, I also included the following to recompile all of the objects:

SELECT 'ALTER '||object_type||' '||lower(object_name)|| ' COMPILE '||Decode ( object_type, 'PACKAGE', 'PACKAGE', NULL )||';' FROM user_objects
WHERE object_type IN ( 'FUNCTION', 'PACKAGE', 'PROCEDURE' ) AND status = 'VALID'
ORDER BY object_name;

Hope this helps!

-- 
Howard Gluckman
Data Architect
U S WEST Communications

Any opinons expressed are mine, and are not necessarily the opinon of U S 
WEST
Received on Thu Oct 31 1996 - 00:00:00 CET

Original text of this message