Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013
    Posts
    18

    Unanswered: Removing Unwanted Spaces From Table Fields, Access 2007

    Hi All,

    I have a concern in IMPORTING data from Excel to Access Table,
    Actually I'am importing bulk data from excel to access table using codes, in which code will auto generate the temptable and uplaod the data to temptable late move required data to the target table.

    My problem is that while creating the temptable im not specifing the lenfg of the fields, cos data is like that, but in target table im getting unwanted extra SPACES after the text, How to get rid of this.

    Thanks in advance
    Prasanna R.D

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    use the trim function Or if you prefer the rtrim
    you could do it before you write the data to an Access table
    eg:-
    Code:
    myvariable = trim(myvaluefromexcel)
    ...myNthvariable= trim(myNthvaluefromexcel)
    or after the data is written to an Access table
    eg:-
    Code:
    update mytable set column1 = trim(column1), column2 = trim(column2), ... columnn = trim(columnn)
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •