Archives of the TeradataForum
Message Posted: Wed, 27 Apr 2005 @ 14:46:30 GMT
Subj: | | Re: Right Aligning Character Field |
|
From: | | Michael Larkins |
Hi Dhanraj:
This seems like a strange requirement, but I assume it has something to do with a language other than English. Regardless, you could do the
following:
, substring(' ' from 1 for 20-char(trim(last_name)))||trim(last_name)
In my example the last_name column is defined as CHAR(20). Therefore, I used 20 spaces in the literal string of spaces inside the
substring function.
Hope this helps,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
|