|
View previous topic :: View next topic
|
| Author |
Message |
huks
New User
Joined: 19 Dec 2006 Posts: 2 Location: brussels
|
|
|
|
Hi,
i try to update a DB2 table with a SAS file in input using PROC DB2UTIL. (OS/390)
But I would like to put a timestamp for each update, how can i do ?
PROC DB2UTIL data=sas-file table=db2 table function=u;
MAPTO sas-name=DB2-name;
SQL SQL-statement;
UPDATE;
WHERE SQL-WHERE-clause;
ERRLIMIT=1
RUN;
I think that i have to put a sql statement but don't know what to write !
Thanks
H. Leclipteur |
|
| Back to top |
|
 |
MFRASHEED
Active User
Joined: 14 Jun 2005 Posts: 186 Location: USA
|
|
|
|
| Quote: |
But I would like to put a timestamp for each update, how can i do ?
|
If you have a timestamp field in table you can set that to 'CURRENT TIMESTAMP', if you want current timestamp.
| Code: |
UPDATE <TABLE>
SET FILD_1 = :HOST-1,
MNTN_TS = CURRENT TIMESTAMP
WHERE ......
|
|
|
| Back to top |
|
 |
huks
New User
Joined: 19 Dec 2006 Posts: 2 Location: brussels
|
|
|
|
sorry but no !
the UPDATE Statement in the DB2UTIL PROC is not similar to an UPDATE command,
it causes the table to be updates by using the mapping specification only.
This statement is not mandatory. |
|
| Back to top |
|
 |
|
|