|
|
Archives of the TeradataForum
Message Posted: Wed, 13 Jul 2005 @ 16:48:39 GMT
Subj: | | Re: Need to remove blank spaces from data |
|
From: | | bppb266 |
Hi
Put this on a procedure controlling remaining spaces or execute it repeatly until remove ( or replace ) all spaces
/** remove first space character in a field **/
UPDATE
a_table
SET
name_field =
CASE WHEN
index(name_field,' ') > 0
THEN
substring(name_field,1,index(name_field,' ')-1) || /* '_' || */
substring(name_field,index(name_field,' ')+1,length(name_field))
ELSE
name_field
END
Regards,
B.
| |