473,385 Members | 1,834 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,385 software developers and data experts.

Updating Partition Key with Before Trigger

We are looking at the possibility of using a before trigger to provide
the value for the partitioning key of a table. It strikes me as
something that would not work, but I have been surprised before. Does
anyone know whether this is allowed with DB2 8.2 or not?

thanks

Jack

Nov 12 '05 #1
3 1597
Why not simply try it? ;-) Yes, this is allowed both in before and in
after triggers. Has been since DB2 UDB for L/U/W Version 8.1.

Regards,
Miro

Nov 12 '05 #2
Well, in case anyone is interested, I did try it. It does seem to
work, I am surprised. I would have expected the before trigger to be
executed after the insert was routed to a partition. Obviously, that
is not exactly what it happening.

Jack

mi******@gmail.com wrote:
Why not simply try it? ;-) Yes, this is allowed both in before and in
after triggers. Has been since DB2 UDB for L/U/W Version 8.1.

Regards,
Miro


Nov 12 '05 #3
<jb****@marketron.com> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Well, in case anyone is interested, I did try it. It does seem to
work, I am surprised. I would have expected the before trigger to be
executed after the insert was routed to a partition. Obviously, that
is not exactly what it happening.

Jack

Somehow I am thinking this is not very efficient since the partition that
gets the row, then has to then send it to another partition. There are
better ways to force data to be loaded on a specific partition, unless
performance is not at all an issue (in which case I wonder why you are using
DPF).
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andreas | last post by:
Hello list, I suspect, this is a common issue for newbies. Is there a simple way to have an auto-updating timestamp like mysql has ? create table something ( id int4, sometext...
3
by: Prince Kumar | last post by:
Hi All, I am trying to a get a trigger retrieved from Oracle to work on DB2 UDB 8.1. I am getting the following error when trying to create the trigger. How would I resolve this? create table...
3
by: Poul Møller Hansen | last post by:
Hi, I need an auto incrementing field that will contain values like N000001, N000002, N000003 etc. I think the way is to use the value from an identity field in a stored procedure that is...
11
by: Amadrias | last post by:
Hi, In one of my current projects, I am willing to create a secure zone such as Acronis does in its application to store some confidential information only accessible to the current machine...
1
by: Robert Fitzpatrick | last post by:
I am running PostgreSQL 7.4.5 and have a trigger on a table called tblriskassessors which inserts, updates or delete a corresponding record in tblinspectors by lookup of a contact id and license...
25
by: John Salerno | last post by:
Forgive my excitement, especially if you are already aware of this, but this seems like the kind of feature that is easily overlooked (yet could be very useful): Both 8-bit and Unicode strings...
0
by: Vinod Sadanandan | last post by:
Table Partition Performance analysis ============================================ Collection of Statistics for Cost-Based Optimization/DBMS_STATS vs. ANALYZE The cost-based approach relies on...
0
by: KiranKGone | last post by:
Hello All, I need to define a trigger for updating the multiple columns of a target table when an insert happens on a subject table. I have written the following trigger, however, getting the...
3
by: chrisindfw | last post by:
Hello all! I have seen very wide discussions on this before on the web but I was wondering what your thoughts were. I have a table where when a record is added, I want to update that row....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.