help to understand a SQL update statement with DIGITS and SIGN
Posted on 2010-11-17
I am trying to understand a SQL update statement with an application we use. Can someone break this down and explain what it is doing? It is used on an DB2 database
The output value is always either a 4 digit string (eg '0003') or null.
Update Table1 set fieldA= SUBSTR(DIGITS(N.INPUT)||'####',7+SIGN(SIGN(1-10000)+1)*4,4) Where record = ......