var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Update query using substr
I'm using DB2 Version 7 Release 2 on an IBM Mainframe. I'd like assistance with an update query if anyone can help. Thanks in advance.
I need to update the last 4 bytes of a string with value ' ' where the current value of the same portion of the field is '0011'
SET CODE_TYPE = (SUBSTR(CODE_TYPE,1,16),' ')
WHERE SUBSTR(CODE_TYPE,17,4) = '00 '
This is the nearest I've got to it, and I know it doesn't work. DB2 really isn't my thing. Can anyone help out?
If I understand right,
set code_type=left(code_type,16)||REPEAT(' ',4)
Visit the new-look IDUG Website
, register to gain access to the excellent content.
Well, you beat me by just a couple of minutes....
I would have suggested something like
SET CODE_TYPE = CONCAT (SUBSTR(CODE_TYPE,1,16),' ')
WHERE SUBSTR(CODE_TYPE,17,4) = '0011'