General information
Category:
Coding, syntax & commands
All the PADR will do is guarantee that the length of the resultant field is 40. Is that the length of the resultant field? If you SELECT from a character type field of size 40 the resultant field will also be 40 regardless of the length of the TRIM() of the first entry in that field since spaces count as characters. Your post suggests to me that you are trimming the first name to remove spaces which is why you end up with a field of length 4. If you trim the PADR() expression you will undo the desired effect of PADR().
Hope this helps.
>I used PADR(origin,40) to make sure the names in the column chow up since I was using a SELECT. As you know, if the first name comes in with 4 letter, all the otrher names in that column will be truncated and have four letters. It ain't woking. I still get the truncation. I even tried, PADR(origin, 40, " "). Still didn't work. Do I need to SET something to ON or OFF?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only