Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DB2 :: RE: insert the same records but chancing a specific value

$
0
0
Author: Rohit Umarjikar
Posted: Tue May 03, 2016 12:32 am (GMT 5.5)

look here

Code:
 INSERT INTO table a
     SELECT replace(b.col1,'KKK','ZZZ')   
                 where   FROM table b
                 LOCATE('KKK', col1) <> 0

Code:
LOCATE('KKK', col1) <> 0
is just to avoid key violation as you say above.
_________________
Regards,
Rohit Umarjikar
"Some things Man was never meant to know. For everything else, there's Google"


Viewing all articles
Browse latest Browse all 9405

Trending Articles