473,513 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session tables in triggers. Is it planned?

Hello.

I see, that even in V9 they are not supported.
Question to IBM:
Is this functionality planned in future?
They are supported in iSeries and I think it's very convenient...

Sincerely,
Mark B.

Sep 20 '06 #1
3 1325
4.****@mail.ru wrote:
I see, that even in V9 they are not supported.
Question to IBM:
Is this functionality planned in future?
They are supported in iSeries and I think it's very convenient...
You can push the body of a trigger into a stored procedure and use them
there. Are you asking for DECLARE'd or CREATEed temp tables in triggers.
The headache about DGTT is that they aren't cataloged.
If DB2 for LUW were to support CGTT (Created) then they woudl be allowed
in the trigger body directly.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 20 '06 #2
Actually, the problem is that I want to copy content of transition
table into session table for futher processing. The goal is
performance.
How can I do this?
Only by calling some procedure in cycle for each row (bad performance i
think for 1 million row insert)?
Is there another way?
You can push the body of a trigger into a stored procedure and use them
there. Are you asking for DECLARE'd or CREATEed temp tables in triggers.
The headache about DGTT is that they aren't cataloged.
If DB2 for LUW were to support CGTT (Created) then they woudl be allowed
in the trigger body directly.
Sep 21 '06 #3
4.****@mail.ru wrote:
Actually, the problem is that I want to copy content of transition
table into session table for futher processing. The goal is
performance.
How can I do this?
Only by calling some procedure in cycle for each row (bad performance i
think for 1 million row insert)?
Is there another way?
You could privatize a persistent table. E.g. use GENERATE_UNIQUE() or a
SEQUENCE to get a ticket. At the end of the trigger DELETE.
Since the trigger is atomic you don't even need to worry about cleanup.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Sep 21 '06 #4

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

Similar topics

5
2056
by: Sparrow | last post by:
I have created a table with the following columns... Date(datetime),Actual (Int),Planned (Int) I need to insert weekending dates starting from 23/04/04 looping thru'for the next 52weeks...
4
2704
by: stacdab | last post by:
We have a partitioned view with 4 underlying tables. The view and each of the underlying tables are in seperate databases on the same server. Inserts and deletes on the view work fine. We then...
1
2336
by: Christoph Graf | last post by:
Hi everybody! As far as I have seen you can inherit from a table and get its columns. Is there a possibility to also inherit a tables triggers? When I simply derive a table from another I...
1
1936
by: HGT | last post by:
Hello all, I am currently on a project which the source data come into the databases is always dirty (not surprisingly); however, due to the design of the database, it is very difficult to...
7
3956
by: aroraamit81 | last post by:
Well Guys, Here is a very strange trouble. When more than one users request tto same page at the same time then our session gets conflicted. Moreover I printed my SessionID, strangely but true I...
9
9298
by: Ots | last post by:
I'm using SQL 2000, which is integrated with a VB.NET 2003 app. I have an Audit trigger that logs changes to tables. I want to apply this trigger to many different tables. It's the same trigger,...
12
6967
by: nyathancha | last post by:
Hi, I have a question regarding best practices in database design. In a relational database, is it wise/necessary to sometimes create tables that are not related to other tables through a...
3
1652
by: tcveltma | last post by:
Hi Everyone, I know there's been a lot of questions regarding the same kind of issue but I haven't been able to find an answer to my specific problem. Basically I have two tables, one table...
0
1985
p8255
by: p8255 | last post by:
Hi All, I am creating separate triggers for tables in MySQL, again for a single table there are three different triggers i.e. on update, delete and insert. So am having 410 tables in all...
0
7160
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
7384
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
7537
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...
1
7099
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5685
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.