Results 1 to 6 of 6

Thread: concatenate

  1. #1
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122

    Unanswered: concatenate

    what would be a good way to concatenate two fields in a table into one field. I have a table with only two fields with 580,000 records- i need to concatenate these two fields.

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    use an update query
    merge the columns into an existing column or into a new column and then delete the old column(s)
    change the forms / reports rreferring to the columns that have been deleted or added.

  3. #3
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122
    OK- i tried that- it worked for the most part. now here's my problem. The two fields i want to merge are numbers. Both are 4 digits. the first part is easy- they contain no leading zeros but the next field DOES have leading Zeros. example: first field- 8645 second field 0009- i want these to fields to look like this- 86450009 when i run the update query i get this 86459. it drops the leading zeros.i tried to format but then i get this 00086459. Help

  4. #4
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    How about using VB to create two arrays, one containing the 8645 data, and a secon one combining the 0009 data.

    You should then be able to create a new table, and combine the two values while maintining data integrity.

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    UPDATE SomeTable SET SomeColumn=Format(FirstColumn,'0000') & Format(SecondColumn,'0000');

    And the problem is???
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Dec 2002
    Location
    Phoenix, AZ
    Posts
    122
    u da man- owen- it worked!!!


    thanks to everyone who help me!!!

Posting Permissions

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