By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,236 Members | 1,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,236 IT Pros & Developers. It's quick & easy.

How update one row with timestamp diferent

P: n/a
Thanks to answer topic previous!!!!

I use this script to update one table

MERGE INTO EIS.CLI_HISTORY TXN
USING EIS.CLI_MAPING CLI
ON TXN.CLIENTID = CLI.CLIENTID
WHEN MATCHED AND
CLI.STATUSID = 3
AND CLI.CLIENTID != CLI.MAPPEDCLIENTID AND
CLI.CLIENTID = 24180 THEN
UPDATE
SET TXN.ISMERGED = 2,
TIMEACTUAL = CURRENT TIMESTAMP,
TXN.CLIENTID = CLI.MAPPEDCLIENTID;

But show problems of duplicate and the problem is with of row
TIMEACTUAL, because I don't put this row and the update was successful.

How I can update one row with TIMESTAMP but that is different. For
example

TimeActual 2005-12-09-09.31.05
TimeActual 2005-12-09-09.31.05

But I need that is diferent like this

TimeActual 2005-12-09-09.31.05
TimeActual 2005-12-09-09.31.06
Thanks to all !!!

Iván

Aug 25 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi, Ivan.

My apologies, but I'm afraid I don't understand what you're trying to
do and what problem(s) you're encountering. Can you take another crack
at describing the task at hand? I'm sure a solution exists, we just
need to nail down the requirements a bit.

Regards,

--Jeff

Ivan wrote:
Thanks to answer topic previous!!!!

I use this script to update one table

MERGE INTO EIS.CLI_HISTORY TXN
USING EIS.CLI_MAPING CLI
ON TXN.CLIENTID = CLI.CLIENTID
WHEN MATCHED AND
CLI.STATUSID = 3
AND CLI.CLIENTID != CLI.MAPPEDCLIENTID AND
CLI.CLIENTID = 24180 THEN
UPDATE
SET TXN.ISMERGED = 2,
TIMEACTUAL = CURRENT TIMESTAMP,
TXN.CLIENTID = CLI.MAPPEDCLIENTID;

But show problems of duplicate and the problem is with of row
TIMEACTUAL, because I don't put this row and the update was successful.

How I can update one row with TIMESTAMP but that is different. For
example

TimeActual 2005-12-09-09.31.05
TimeActual 2005-12-09-09.31.05

But I need that is diferent like this

TimeActual 2005-12-09-09.31.05
TimeActual 2005-12-09-09.31.06
Thanks to all !!!

Iván
Aug 25 '06 #2

P: n/a
Thanks!!!

I need update more of one row with Timestamp, for example mi script
extract 4 rows, and I need update these rows with diferent timestamp

Row1 TimeActual 2005-12-09-09.31.52
Row1 TimeActual 2005-12-09-09.31.53
Row1 TimeActual 2005-12-09-09.31.54
Row1 TimeActual 2005-12-09-09.31.55

I need that each row is different to be able to update my the table.

Hope is more clear.

Greetings
Iván

jefftyzzer wrote:
Hi, Ivan.

My apologies, but I'm afraid I don't understand what you're trying to
do and what problem(s) you're encountering. Can you take another crack
at describing the task at hand? I'm sure a solution exists, we just
need to nail down the requirements a bit.

Regards,

--Jeff

Ivan wrote:
Thanks to answer topic previous!!!!

I use this script to update one table

MERGE INTO EIS.CLI_HISTORY TXN
USING EIS.CLI_MAPING CLI
ON TXN.CLIENTID = CLI.CLIENTID
WHEN MATCHED AND
CLI.STATUSID = 3
AND CLI.CLIENTID != CLI.MAPPEDCLIENTID AND
CLI.CLIENTID = 24180 THEN
UPDATE
SET TXN.ISMERGED = 2,
TIMEACTUAL = CURRENT TIMESTAMP,
TXN.CLIENTID = CLI.MAPPEDCLIENTID;

But show problems of duplicate and the problem is with of row
TIMEACTUAL, because I don't put this row and the update was successful.

How I can update one row with TIMESTAMP but that is different. For
example

TimeActual 2005-12-09-09.31.05
TimeActual 2005-12-09-09.31.05

But I need that is diferent like this

TimeActual 2005-12-09-09.31.05
TimeActual 2005-12-09-09.31.06


Thanks to all !!!

Iván
Aug 28 '06 #3

P: n/a
Use TIMESTAMP(generate_unique())
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Aug 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.