October 5th, 2017, 07:58 AM
Join Date: Oct 2017
Time spent in forums: 5 m 3 sec
Reputation Power: 0
How to copy one column into another column using DB2 SQL
How to copy one column into another column using db2 SQL
SELECT DISTINCT T1.PROJECT_NAME,
T1.NAME AS URL1_title,
T1.URL AS URL1,
T3.VAL AS VAL1
FROM RIDW.VW_REQUEST T1
LEFT OUTER JOIN RICALM.VW_RQST_STRING_EXT T2
ON T2.REQUEST_ID=T1.REQUEST_ID AND T2.NAME='owner_1'
LEFT OUTER JOIN RICALM.VW_RQST_STRING_EXT T3
ON T3.REQUEST_ID=T1.REQUEST_ID AND T3.NAME='owner_2'
WHERE T1.PROJECT_ID = 0 AND
( T1.REQUEST_TYPE = 'Task'
(T1.ISSOFTDELETED = 0) AND
(T1.REQUEST_ID <> -1 AND T1.REQUEST_ID IS NOT NULL)
Here is my sql query I want to copy owner_2 col into owner_1 col
there are two column here owner_1 and owner_2, I want to copy all contents from owner_2 to owner_1
owner1 | owner2
| ABC| |ABC|
|PQR | |LMN|