breezett93
Technical User
Hello all,
I need to make two updates to one column. First, I need to ALLTRIM one column in every record. Second, in the same column, I need to add a 0 to the left in every record where the value is < 100. That way, all values for that column will have 3 digits and have no blanks.
So I thought using UPDATE would be perfect. This is how I understand the command:
UPDATE tableName
SET columnName = x
WHERE condition
I'm wondering if I can use the ALLTRIM and PADL functions as the expressions.
UPDATE tableName
SET columnName = columnName + PADL(columnName, 3, "0")
WHERE columnName < 100
Thank you.
I need to make two updates to one column. First, I need to ALLTRIM one column in every record. Second, in the same column, I need to add a 0 to the left in every record where the value is < 100. That way, all values for that column will have 3 digits and have no blanks.
So I thought using UPDATE would be perfect. This is how I understand the command:
UPDATE tableName
SET columnName = x
WHERE condition
I'm wondering if I can use the ALLTRIM and PADL functions as the expressions.
UPDATE tableName
SET columnName = columnName + PADL(columnName, 3, "0")
WHERE columnName < 100
Thank you.