August 15, 2007 at 7:32 am
I have data that I've imported into a table in the AS/400 (DB2) from SQL 2000. I need to update a column in a table that previously existed on the AS/400 with the new data I've imported from SQL 2000.
Any idea how to do an update that contains an inner join in DB2?
and I need to update them with the values from Table2.Column2 (cubiscan.CFFIHGTH)
where Table1.Column1(FFIITMAP.FFIITMN) = Table2.Column1(cubiscan.CFFIITMN)>
--DB2 Doesn't like the From>
set FFIHGTH = CFFIHGTH
From idsdemo.FFIITMAP
inner join idsdemo.cubiscan on ltrim(rtrim(idsdemo.cubiscan.CFFIITMN)) = ltrim(rtrim(idsdemo.FFIITMAP.FFIITMN))>
Update idsdemo.FFIITMAP
inner join idsdemo.cubiscan on ltrim(rtrim(idsdemo.cubiscan.CFFIITMN)) = ltrim(rtrim(idsdemo.FFIITMAP.FFIITMN))
set FFIHGTH = CFFIHGTH >
Update idsdemo.FFIITMAP
set FFIHGTH =
(select CFFIHGTH from idsdemo.cubiscan
inner join idsdemo.FFIITMAP on ltrim(rtrim(idsdemo.FFIITMAP.FFIITMN)) = ltrim(rtrim(idsdemo.cubiscan.CFFIITMN))
)>
August 15, 2007 at 8:15 am
no need to cross post the same question in different forums. the Active Topics shows all new stuff.
continue and answered here:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=390752
Lowell
August 15, 2007 at 8:20 am
I had noticed I posted the original question under a category that was not consistent with my question so I posted under a category that made more sense, however I didn't know how to remove the original posting. Sorry...
August 15, 2007 at 8:41 am
That's ok BH. This place is filled with anal people.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply