Results 1 to 3 of 3
  1. #1
    sberti is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    33

    Merge fields (not concatenate)

    I wondering if it is possible to merge to 2 fields into a new new field (but I don't mean to concatenate them)
    This is to track stock that has Transferred from one Unit to another:

    Unit Names: CC1, CC3, CC4, CC7

    This is the kind of thing I'd like to do:

    Fields: [FromUnit][ToUnit]

    [FromUnit] [ToUnit]
    CC1 CC3
    CC3 CC4
    CC4 CC7

    Convert to:


    [Transfers]
    CC1
    CC3
    CC4
    CC7

    I've been trying to do it using a table and a copy of the same table, then trying to join the [FromUnit] in the Original Table with the [ToUnit] in the Copy Table. but I can't get it to work.

    Any suggestions?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Use a UNION query. No wizard or designer for UNION, must type into the SQL view of Query Designer. A UNION query will not allow duplicate records unless you include the ALL keyword.

    SELECT [FromUnit] As Transfers FROM tablename
    UNION ALL SELECT [ToUnit] FROM tablename;

    What is the reason for this?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    sberti is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2012
    Posts
    33

    Tracking Costs

    I'm tracking costs.
    Each Unit contains fish.
    Each unit has a monthly Operating Expense associated with it.
    At certain times the fish are Graded by size into new Untis. (smalls, mediums, larges) This can happen a number of times throughout the life cycle of the fish.
    I'm associating the Operating Expenses to each of the new Graded pens using the same percent as the percent of the Biomass (kgs of fish) that transfers to each pen.
    In order to find the Total Cost of Operating Expense for the fish in the final pen, I need to be able to sum up the expenses back through all the Unit Transfers.

    I'm finding it to be a challenge. I'll try your suggestion. Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. merge two fields in access? how to ?
    By vivah in forum Queries
    Replies: 6
    Last Post: 07-23-2012, 10:02 AM
  2. merge or concatenate two rows in one
    By vojinb in forum Queries
    Replies: 7
    Last Post: 08-03-2011, 09:15 AM
  3. Creating Query from Code, Concatenate fields
    By eww in forum Programming
    Replies: 5
    Last Post: 07-18-2011, 02:19 PM
  4. Merge two fields
    By daviddoria in forum Access
    Replies: 0
    Last Post: 01-31-2009, 09:12 AM
  5. Concatenate two fields (text & number) for key field
    By Larry Elfenbein in forum Forms
    Replies: 2
    Last Post: 11-10-2005, 07:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums