From e0a5a6bfc8997832ee9407e62363bf2e79e10d2a Mon Sep 17 00:00:00 2001 From: PriestJ Date: Tue, 4 Dec 2007 14:38:29 +0000 Subject: [PATCH] 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 --- Modules/MIP_FILES.pck | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Modules/MIP_FILES.pck b/Modules/MIP_FILES.pck index c78cee2..780e918 100644 --- a/Modules/MIP_FILES.pck +++ b/Modules/MIP_FILES.pck @@ -5,7 +5,7 @@ create or replace package MIP_FILES is -- Purpose : Handle files for the webMIP system -- 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_delimiter IN VARCHAR2 DEFAULT ','); @@ -39,7 +39,6 @@ BEGIN FROM user_tab_columns WHERE table_name = upper(p_table) 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 -- in a nice CSV format @@ -77,7 +76,7 @@ BEGIN IF l_found THEN -- -- 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 htp.p('Content-Disposition: attachment; filename="'||lower(p_table)||'.csv"'); -- Close the HTTP Header @@ -87,10 +86,10 @@ BEGIN -- -- If the user has requested that the tables column names be exported -- then display them - if upper(p_column_headers) = 'Y' then + if upper(p_column_headers) = 'YES' then --print column headers htp.p(l_headers); - end if; + end if; -- END IF; -- @@ -104,6 +103,6 @@ BEGIN END LOOP; -- END export_table_to_csv; - + end MIP_FILES; /