Garayed.com  

Go Back   Garayed.com > Oracle
FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-09-2006, 04:08 AM
sappi
 
Posts: n/a
Default .sql file

Hi all,

I have created a .sql file which has insert statements, invoking
procedures and other functions.

when i execute the script, It is running fine by outputting "procedure
ran successfully".

But i want to see the output as

inserted 28569 rows successfully.

procedure ran successfully

I mean ,if we want to see all actions performed,how should I go about
it.where shouldi include begin and end

eg: here is the .sql file

declare
RetVal NUMBER;
P_QUERY VARCHAR2(200);
P_DIR VARCHAR2(200);
P_FILENAME VARCHAR2(200);
P_INCLUDE_HEADER NUMBER;
P_SEPARATOR VARCHAR2(200);
P_FIELDS_ENCLOSED_BY VARCHAR2(200);

pu_unknown_excep EXCEPTION;
PRAGMA EXCEPTION_INIT (pu_unknown_excep, -20009);

BEGIN
SELECT TO_CHAR(SYSDATE,'YYYYMMDD') INTO TODAY FROM dual;

insert into BBT_TBL
(select
to_char(trunc(sysdate),'YYYYMM') RPT_YYYYMM ,
EMPLOYERGROUPID ,
EMPLOYEESSN ,
RELATIONSHIPCODE ,
GENDER ,
DATE_OF_BIRTH
from BBT_IN_ELG_XTB XTB);

--commit;

Rollback;


--calling procedure

declare
BOM INT;
TERM_BY_DEL INT;
ADJ_BY_ADD INT;
EOM INT;
HIRE_CUR_MTH INT;
TERM_CUR_MTH INT;

begin

MTHLY_BILLING_REPORT(BOM,TERM_BY_DEL,ADJ_BY_ADD,EO M,HIRE_CUR_MTH,TERM_CUR_MTH);
end;


BEGIN
P_QUERY := 'SELECT * FROM MTHLY_BILL_RPT_V';
P_DIR := '/mar/tmp';
P_FILENAME := 'bbt_Rpt';
P_INCLUDE_HEADER := 1;
P_SEPARATOR := ',';
P_FIELDS_ENCLOSED_BY := NULL;

RetVal := DUMP_CSV ( P_QUERY, P_DIR, P_FILENAME, P_INCLUDE_HEADER,
P_SEPARATOR, P_FIELDS_ENCLOSED_BY );
-- COMMIT;
ROLLBACK;
END;
end;
/
exit;

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:25 PM.




LinkBacks Enabled by vBSEO 3.0.0 © 2007, Crawlability, Inc.