Home » SQL & PL/SQL » SQL & PL/SQL » How to drop table in After Report Trigger in Reports?
How to drop table in After Report Trigger in Reports? [message #19378] Wed, 13 March 2002 11:21 Go to next message
sky
Messages: 4
Registered: March 2002
Junior Member
I am trying to create a temp table in Before Parameter Form Trigger. Then after I am done with the report I need to drop it. I tried to add in the After Report Trigger:
SRW.DO_SQL ('Drop Table Temp');
But it seems to me that the sql didn't really get through at all. The temp table is still there.
Can anyone tell me what should/can I do instead? THANKS A LOT~
Re: How to drop table in After Report Trigger in Reports? [message #19388 is a reply to message #19378] Wed, 13 March 2002 23:13 Go to previous messageGo to next message
THA
Messages: 26
Registered: February 2002
Junior Member
try this
srw.do_sql(drop table
);

works?
Re: How to drop table in After Report Trigger in Reports? [message #19405 is a reply to message #19388] Thu, 14 March 2002 18:07 Go to previous messageGo to next message
sky
Messages: 4
Registered: March 2002
Junior Member
I've tried that. I put it in the After Report Trigger, but the problem is this command line doesn't take effect at all... the table is still there..
Re: How to drop table in After Report Trigger in Reports? [message #19471 is a reply to message #19388] Thu, 21 March 2002 00:27 Go to previous message
sathya
Messages: 27
Registered: December 2000
Junior Member
You have to write the code like that

srw.do_sql('drop table t1');
srw.message(1,'dropped scuessfully');
return (TRUE);
exception
WHEN SRW.DO_SQL_FAILURE THEN
SRW.MESSAGE(100, 'ERROR WHile dropping tables');
RAISE SRW.PROGRAM_ABORT;

in after report trigger:

This trigger will fire only in runtime previewer.

It is working for me.
Previous Topic: how to use floor(to_number(substr(x))) in where clause?
Next Topic: Fate of existing object statistics after an ANALYZE
Goto Forum:
  


Current Time: Fri Apr 26 05:46:11 CDT 2024