Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

How to find out which of the record that has been updated after an appliction runs.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
bikkaran@in.ibm.com - 09 Feb 2006 09:11 GMT
Hi ,

I am running a C++ application   that  performs  DML operation  a
particular table of a database.
I want to find out which the record that got updated  or inserted .  As
a DB2 user I dont have any DB2  DBA privilege   .

How can I find out all those that are affected by the DML operation.

Please help me.

Thanks a lot.

Regards
Bikash Karan
adik_q@wp.pl - 09 Feb 2006 09:24 GMT
bikkaran@in.ibm.com napisal(a):
> Hi ,
>
[quoted text clipped - 11 lines]
> Regards
> Bikash Karan

You can use SELECT .. FROM FINAL|NEW|OLD TABLE (insert/update/delete
stmt)
i.e. SELECT * FROM FINAL(INSERT INTO table1 VALUES('text',2))

For more details:
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp
References->SQL->Queries->Subselect 'table-reference'

Regards
Adrian
Tonkuma - 09 Feb 2006 09:36 GMT
Please see sqlerrd(3) in SQLCA.
Manual "SQL Reference" wrote "..... After INSERT, UPDATE, DELETE, or
MERGE, contains the actual number of rows that qualified for the
operation. ....."
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.