473,597 Members | 2,092 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 1330
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
2062
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 automatically into the date column. Then in the actual and planned colums, I need to insert a count of some records in the table. I will appreciate help on a SQL query to achieve this!
4
2712
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 add insert and delete triggers to each of the underlying tables. The triggers modify a different set of tables in the same database as the view (different than the underlying table). The problem is those triggers aren't fired when inserting or...
1
2347
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 don't get them (-> they don't trigger). It there is a way please tell me how I do this (and where I can find more information about writing triggers in a OO sense - e.g. depending on which table actually triggers, ...), if not where can I find...
1
1948
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 impose referential integrity (esp. Foreign Keys) on these tables. Am I just not thinking straight? This solution is implemented on multi RDBMS. Example, we have 2 tables, one with a number of columns and a TIMEID column to specify the load date (in...
7
3962
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 got the exact same SessionID as of other users's. Well I guess nothing wrong with my code, do I need to set any property in Web.Config file??
9
9301
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, with the exception of the table name. I could manually change the table name in the trigger and create it, over and over, but I'd like to automate this - by iterating through the collection of tables and passing the tablename to something that...
12
6988
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 foreign Key relationship or does this always indicate some sort of underlying design flaw. Something that requires a re evaluation of the problem domain? The reason I ask is because in our application, the user can perform x
3
1657
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 showing planned hours for a week and one table showing actual hours for that week. At the beginning of each week employees are supposed to fill out the hours the expect to spend on each task. Then at the end of the week, they input the actual hours...
0
1990
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 and I have to create 410*3 = 1230 triggers for my project. Is there anyway i can call a generic trigger and may be a stored procedure so that i dont have to manually write separate triggers. Please help me out. Thanks in advance, ...
0
7965
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8270
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8380
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8029
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6683
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5845
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3880
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2394
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1230
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.