View previous topic :: View next topic
|
Author |
Message |
poul_motiram Currently Banned New User
Joined: 05 Dec 2006 Posts: 13 Location: chennai
|
|
|
|
How to display a last inserted record in a table. |
|
Back to top |
|
|
prav_06 Warnings : 1 Active User
Joined: 13 Dec 2005 Posts: 154 Location: The Netherlands
|
|
|
|
poul_motiram,
If ya using a Cobol pgm to update the tables u can use a simple display before u give a commit or exiting out. but does this answeres your question or do u have any spl criteria.
Thamilzan. |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Use the MAX option in a Select in case you have a adaquate Field in your DB. Something like a timestamp of insert or update.
Select....
Into ....
,:Field01
,:Field02
,:Field03
FROM TB_TableName
WHERE TB_ID = :Key-Field
AND TS_Insert =
( SELECT MAX(TS_Insert)
FROM TB_TableName
WHERE TB_ID = :Key-Field)
Regards, UmeySan |
|
Back to top |
|
|
|