473,738 Members | 6,042 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 1334
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
2069
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
2716
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
2360
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
1955
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
3967
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
9311
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
7015
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
1666
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
1994
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
8968
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
9334
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
9259
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
9208
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8208
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...
0
6053
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4824
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
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
3
2193
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.