Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316

    Unanswered: Concatenating Numbers (of 'Double' type)

    I have 3 fields in a table:

    WorkRequestID
    RFANumber
    ActivityID

    Each is set as Number - Double.

    I have a fourth field called:

    CalcReference

    This is also Number - Double type. I want to concatenate the WorkRequestID with RFANumber and ActivityID. Using the following in an update query, however, doesn't work:

    [WorkRequestID] & [RFANumber] & [ActivityID]

    If WorkRequestID = 1000555899, RFANumber = 1, and ActivityID = 1, then I get the following:

    1.00055589911E+11

    When what I need is:

    100055589911

    Does anyone know whats going on here? I want to keep CalcReference as an Integer rather than a Text field (which would sort the problem) as it will form a primary key.

  2. #2
    Join Date
    Nov 2003
    Posts
    267
    Why create this new field for the purpose of maeking it you primary key. You can make the combination of the three fields a primary key without the need of combining them. Combining them creates redundate data. in the design view of your table, jsut select all three field and make them a primary key.

    The whn you need to display you three way key as one field you can do that as a text of display purposes only.

    S-

  3. #3
    Join Date
    Jul 2002
    Location
    Island of Dots
    Posts
    316
    WorkRequestID, RFANumber, and ActivityID are 3 seperate fields, and I will not be keeping them in the destination table, I will only be keeping CalcReference. For indexing purposes, surely its faster to index 1 (integer) field rather than 3? I'm dealing with a large amount of data, hence the above reasoning.

Posting Permissions

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