the export csv_routine was incorrectly referring to Y instead of Yes, on the question of whether column headings should be included in the csv file
git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2937 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
@@ -5,7 +5,7 @@ create or replace package MIP_FILES is
|
|||||||
-- Purpose : Handle files for the webMIP system
|
-- Purpose : Handle files for the webMIP system
|
||||||
|
|
||||||
-- Public function and procedure declarations
|
-- Public function and procedure declarations
|
||||||
PROCEDURE export_table_to_csv(p_table IN VARCHAR2,
|
PROCEDURE export_table_to_csv(p_table IN VARCHAR2,
|
||||||
p_column_headers IN VARCHAR2,
|
p_column_headers IN VARCHAR2,
|
||||||
p_delimiter IN VARCHAR2 DEFAULT ',');
|
p_delimiter IN VARCHAR2 DEFAULT ',');
|
||||||
|
|
||||||
@@ -39,7 +39,6 @@ BEGIN
|
|||||||
FROM user_tab_columns
|
FROM user_tab_columns
|
||||||
WHERE table_name = upper(p_table)
|
WHERE table_name = upper(p_table)
|
||||||
ORDER BY column_id) LOOP
|
ORDER BY column_id) LOOP
|
||||||
dbms_output.put_line('me is in loop');
|
|
||||||
--
|
--
|
||||||
-- AG's clever delimiting ensures that the rows from the table are output
|
-- AG's clever delimiting ensures that the rows from the table are output
|
||||||
-- in a nice CSV format
|
-- in a nice CSV format
|
||||||
@@ -77,7 +76,7 @@ BEGIN
|
|||||||
IF l_found THEN
|
IF l_found THEN
|
||||||
--
|
--
|
||||||
-- Set the header MIME type
|
-- Set the header MIME type
|
||||||
owa_util.mime_header( 'application/octet', FALSE );
|
owa_util.mime_header( 'application/octet', FALSE );
|
||||||
-- Set the name of the file
|
-- Set the name of the file
|
||||||
htp.p('Content-Disposition: attachment; filename="'||lower(p_table)||'.csv"');
|
htp.p('Content-Disposition: attachment; filename="'||lower(p_table)||'.csv"');
|
||||||
-- Close the HTTP Header
|
-- Close the HTTP Header
|
||||||
@@ -87,10 +86,10 @@ BEGIN
|
|||||||
--
|
--
|
||||||
-- If the user has requested that the tables column names be exported
|
-- If the user has requested that the tables column names be exported
|
||||||
-- then display them
|
-- then display them
|
||||||
if upper(p_column_headers) = 'Y' then
|
if upper(p_column_headers) = 'YES' then
|
||||||
--print column headers
|
--print column headers
|
||||||
htp.p(l_headers);
|
htp.p(l_headers);
|
||||||
end if;
|
end if;
|
||||||
--
|
--
|
||||||
END IF;
|
END IF;
|
||||||
--
|
--
|
||||||
@@ -104,6 +103,6 @@ BEGIN
|
|||||||
END LOOP;
|
END LOOP;
|
||||||
--
|
--
|
||||||
END export_table_to_csv;
|
END export_table_to_csv;
|
||||||
|
|
||||||
end MIP_FILES;
|
end MIP_FILES;
|
||||||
/
|
/
|
||||||
|
|||||||
Reference in New Issue
Block a user