I have 3 columns and basically I want to combine them into a fourth column and TRIM the data to less than 32 ?
I’m a little confused how to do this – basically I’m trying to do:
Column A - TEXT
Column B - Number
Column C - I need to Trim this to 10 chars and then use this Trimmed value
Column D = ColumnA + Column B + Column C
?
Edit:
So I’m trying this
UPDATE table
SET
D = substring(concat(A, B, "|", substring(C, 0, 10)), 0, 32)
WHERE
D IS NOT NULL
Will this work or ?
Maybe something like this (untested)…
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substr