|
Sybernet / Supplied Procedures Reference
Release 3.00 Dec 05, 2006 |
|
This application provides a convenient mechanism for extracting table data from your Oracle database. The result is a PL/SQL script suitable for uploading. You can even specify your own where clause to extract a subset of this table.
Use this form screen to submit your table name and any of the options described below.
| Option | Description |
|---|---|
owner |
Table owner. |
table name |
Table name. |
where |
Use this field to specify an optional where clause. |
disposition |
This option allows you to download this script to your PC (attachment) or browser (inline). |
ddl |
This option allows you to include the table definition. |
verbose |
Determines how the insert statement is built. Setting this to true includes the column name and column value on separate lines. Setting this to false suppresses the column name and builds the insert statement on a single line. |
anonymous block |
This option determines if you want a batch file where each command is separated by a slash (/) or an anonymous block where the entire script is bound by begin and end pairs. |
The easiest way to run this application is to invoke it from Sybernet Utilities and enter the options above in the fields provided. It can also be executed in batch mode as illustrated in this example. In this example we'll have to use real parameter names that may or may not match the above. Disposition (or contenttype) is really a function of your browser so this doesn't apply when invoked in batch mode.
http.sp_html_unload_table
(
button => 'EXTRACT'
, owner => 'HTTP'
, table_name => 'CRON_KEYWORDS'
, whereclause => 'NAME = ''DEBUG'''
, ddl => 0
, verbose => 0
, anonymous => 0
)
The output of this command resembles the following. Notice too that your where clause is included in the delete statement that begins this output.
DELETE HTTP.CRON_KEYWORDS WHERE NAME = 'DEBUG'
/
INSERT INTO HTTP.CRON_KEYWORDS VALUES ('DEBUG','FALSE,TRUE','SELECT','1',NULL,NULL,NULL,NULL,NULL,NULL,'FALSE')
/
Here's the same example with verbose set to true (1) and anonymous set to true (1).
http.sp_html_unload_table
(
button => 'EXTRACT'
, owner => 'HTTP'
, table_name => 'CRON_KEYWORDS'
, whereclause => 'NAME = ''DEBUG'''
, ddl => 0
, verbose => 1
, anonymous => 1
)
The output of this command resembles the following:
BEGIN
DELETE HTTP.CRON_KEYWORDS WHERE NAME = 'DEBUG';
INSERT INTO HTTP.CRON_KEYWORDS
(
"NAME"
, "VALUE"
, "TYPE"
, "SIZE"
, "STYLE"
, "MINVALUE"
, "MAXVALUE"
, "ALIGN"
, "SCALE"
, "COMMA"
, "CHECKED"
)
VALUES
(
'DEBUG'
, 'FALSE,TRUE'
, 'SELECT'
, '1'
, NULL
, NULL
, NULL
, NULL
, NULL
, NULL
, 'FALSE'
) ;
END;