How to Delete Blank Spaces in a Field?

  • Thread starter johnnywinter via AccessMonster.com
  • Start date
J

johnnywinter via AccessMonster.com

I import a Foxpro DBF table APCHK from our accounting system. Table APCHK
has a text field for CheckNumber. Field is 8 characters in length and is
any combination of Alpha and numeric.

The values appear to have leading blank spaces ---- meaning if the value has
5 characters there are 3 blank spaces and if the value has 6 characters there
are 2 blank spaces, etc.

Problem: how can I eliminate any "blank spaces" in all values in that field
for all records?
 
R

Rob

Hi,

Try the function called LTrim(). It will remove leading spaces from a
string. Just read the field into a string variable, LTrim and then
update the table with the new data. There should be more info in the
help file,

HTH

Cheers
Rob
 
J

johnnywinter via AccessMonster.com

Rob, worked perfectly. Thanks a lot.


Hi,

Try the function called LTrim(). It will remove leading spaces from a
string. Just read the field into a string variable, LTrim and then
update the table with the new data. There should be more info in the
help file,

HTH

Cheers
Rob

I import a Foxpro DBF table APCHK from our accounting system.    Table APCHK
has a text field for CheckNumber.   Field is 8 characters in length and is
[quoted text clipped - 9 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top