Link to home
Start Free TrialLog in
Avatar of Fordraiders
FordraidersFlag for United States of America

asked on

weird character will not disapper after trim update

access 2003
need a function if necessary please...or update statement

I have a field in a table that has a box character at the end of the field.

I tried using:
UPDATE SapAlt_Staging_Prmdb025 SET SapAlt_Staging_Prmdb025.alt_acc_material_no = Trim([alt_acc_material_no]);


but the character will not go away ?
see pic below

Thanks
fordraiders


weird-character.png
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

you can not remove that weird character with a trim()

if you want the first 6 characters, use

left([fieldName],6)  


update table
set [fieldName]=left([fieldName],6)  
you can also use the replace() function, but you have to know the ascii value of thet weird character.

try this

 update table
set [fieldName]=replace(replace(replace([fieldName],chr(13) & chr(10),"") ,chr(13),""),chr(10),"")
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Fordraiders

ASKER

Thanks to both