Results 1 to 2 of 2
  1. #1
    rashokku is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Nov 2017
    Posts
    3

    Updating values in a table based on the combination of values in the columns in the same table

    First of all the thanks for your help. Attachment is the spec which I am explaining below.



    Columns in table:
    --------------------
    MemberID (Primary Key):
    COL1
    COL2
    COL3
    COL4
    COL5
    COL6
    COL7
    COL8
    COL9
    COL10
    COL11
    COL12

    I have 13 columns in a table in MS Access database as above. I would like to update the columns based on the combination as in the attached specification.
    For example, if the combination is "9, 10, 11, 12" (if atleast four or more of the 12 columns has all the four values in any order - let us say
    COL1 = 10, COL2 = 9, COL3 = 12, COL4 = 11, COL5 = 12 then update the columns with 8.

    Attachment has combination and the values to be updated. Another example, from attachment/spec. If the combination is 111, 112 (atleast two of the columns having each of the values)
    then update the columns with 110.

    Anybody can provide insights on the approach.

    Thanks,
    Ram
    Attached Thumbnails Attached Thumbnails Diease_Hierarchy.png  

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,706
    This looks pretty tough. Each record in the table would have to be examined for each of the 31 combinations and updated appropriately. Do any of the records have multiple combinations across the 12 columns? That would double or triple the required checking and updating. And then, how many records are in the table?
    The coding complexity boggles the mind and the computer execution time required to accomplish the results might be unacceptable if the table contains more than a few dozen records.
    If I have this wrong, anyone else have an epiphany - or better yet, an algorithm?
    Last edited by davegri; 11-28-2017 at 03:22 PM.

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

Similar Threads

  1. Change Table Index Values Based on query Values
    By thuzkee02 in forum Import/Export Data
    Replies: 2
    Last Post: 11-24-2015, 11:45 PM
  2. Replies: 3
    Last Post: 06-25-2013, 10:57 AM
  3. Replies: 2
    Last Post: 11-12-2012, 03:52 AM
  4. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  5. Replies: 3
    Last Post: 08-08-2011, 11:02 AM

Tags for this Thread

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