473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Truncate table inside trigger(Urgent help needed)

58
hi,
how do you truncate a table inside a trigger(plsql) if the table size is more than 1000 records???
regards,
jith
Oct 4 '07 #1
2 4654
debasisdas
8,127 Expert 4TB
Try to use native dynamic sql (EXECUTE IMMEDIATE)

also mark the trigger as pragma autonomous_transaction;
Oct 4 '07 #2
gintsp
36
Try to use native dynamic sql (EXECUTE IMMEDIATE)

also mark the trigger as pragma autonomous_transaction;
Just remember that pragma autonomous_transaction and truncate is very dangerous tool. In case your main transaction is rolled back, truncated table will remain truncated anyway.

Gints Plivna
http://www.gplivna.eu
Oct 4 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Remove the obvious for replies | last post by:
I am using DB2 8.1.4 with SDE and Info Integrator. I am trying to create a trigger to populate a spatial table based on values from an attribute table. However, it appears to not recognize the CASE...
4
by: SK | last post by:
Hi i m populating a datagrid with data from excel. is it possible to take the datatable in this dataset and create the same as a new table in SQl database. can some one gimme ideas to solve the same...
5
by: ruben20 | last post by:
Hi: Is there any way to recover data from a corrupted table? I can only run SELECTs on certain WHERE conditions. I cannot vacuum, pg_dump, I've deleted the indexes and try to reindex, always...
2
by: Deano | last post by:
Problem is that there are lots and lots of fields in an employee record. I specify a form control as the criterion for one of those fields which is the value of the primary key for that record. ...
0
by: mary76 | last post by:
Hi All, I created one sequence in DB2 udb. I want to know in which system tables, this information stores. your early information is appreciated. Thanks in advance. mary.
2
by: tezza98 | last post by:
Hi im creating a function to insert data from a MYOB file into an Access database. what im trying to do is copy entire tables from MYOB into ACCESS. Im using a simple Access Database with so there...
7
by: jp45678 | last post by:
Hi, been trying to do this for literally hours, cannot for the life of me remember how to do it. I have one table for Clients, just surname, forename, address, contact number etc, and I have added...
3
by: abie16 | last post by:
I'm creating a database for my company. Here we have errors form to calculate the errors done. The data entered in this form need to update into the errors table. This is my code but i'm getting...
1
by: DataFinder | last post by:
Not wanting to re-create the wheel, I have a need for a two-column table that links nicknames and given names if they are a derivative or source of another. Can you help? Using an Access...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.