Sorry slighthaze, but if Part_No is a numeric field then you cannot replace the same numeric field with string data. If it were being placed into a separate character field then your example would certainly be fine.
Presumably though we're dealing with a character field so repete's code would work in this case.
TRIM() will remove Trailing blanks only where ALLTRIM() will remove both Preceeding and Trailing blanks.
Since data is input by humans we cannot always ensure the quality of the data (not all GET's have Valid functions nor do they typically catch ALL human errors) and where things like spaces may occur.
Therefore to be safe it is just as easy to utilize ALLTRIM() as it is TRIM() and it will better ensure the results.
Good Luck,
JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
Of course, but the data validation is done at the get level. Also the question, I think was to append the data at the end of the existing string not to validate and correct it. Which(validation) has already been done.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.