Hi,I am working on a grouping task but just can't quite get my mind wrapped around it. Being somewhat of a newbie, I am still experiencing that learning curve.So I will layout my data fist then ask what I am looking for at the end.The master lookup table.Table MmID mTitle100147 my title100145 another title100148 yet another100149 well finally
A table holding a field (dRef) that will get populated.Table BbID bTitle dRef1 display 1 NULL2 display 2 NULL3 display 3 NULL4 display 4 NULL
A reference table for connecting tables M and B (M.mid = J.mID)Table JmID bID100147 1100145 1100148 1100149 2100147 2100145 3100149 4100147 4
Now the meat of what I am looking for. I need to query table J to build two new tables D and C followed by updating the dRef field of table B with its matching reference from the group combination, Table D - field dID (B.dref = D.dID).If this is not enough, lastly, if table J has only ONE table B.bID reference (like row bID#4 in table B) then B.dRef gets populated with its one J.mID value (in this case '100145').Table C is populated from table J based on every unique combination of mID limited to the same J.bID (where count > 1). Table C will be the group data reference for Table D (D.dID = C.dID)Table D will be a group reference table with an newly created identity seed "dID" for every new unique group (where count > 1) found per set in table J.Final results for newly created temp variable tables...Table DdID 200 201
Table CdID mID 200 100147200 100145200 100148201 100149201 100147
Final results for table B update...bID bTitle dRef1 display 1 2002 display 2 2013 display 3 1001454 display 4 201
I am having a tough time even getting started with. Any help would be greatly appreciated!Thanks,~Nathan