Hi, I'm trying to tidy up some data and ... as you may well spot(!) I'm pretty new to Access.
I've got 1 table [called old] which has 2 fields: SKU_old and the associated drawing numbers: drawing_ref
And the other table [called new] which 1 field: SKU_new
I can see how to set up the relationship so that the there is a one to many relationship between the SKU_old and SKU_new from the different tables.
And I have managed to set up a query which will cross reference which records from SKU_new are also in the old table & show the corresponding drawing numbers.
BUT.... (and here's the but haha!)
I would like to do a query as above but rather than where the SKU_old EQUALS the SKU_new, I'd like to be able to find records which CONTAIN or maybe even BEGIN or ENDS WITH
Excuse the capitals, I've been looking into boolean expressions to see if this would help lol
Hope this may help:
OLD TABLE
NEW TABLE
At the moment, the only way that I can query this is where the SKU_old on the new table *equals* the SKU_new on the new table. As per Line ID 1 on the new table.
But is it also possible to design the query so that access will generate results for:
New Line ID 2: where the SKU_new is *contained* in the SKU_old? i.e. BC12 is contained in ABC123 & show the drawing numbers?
New Line ID 3: same except for the ABC12 "begins with"
So in an ideal world, the results of my query would look something like this:
RESULTS TABLE
Huge apologies if I'm mangling some of the terminology...
(By the way, this is all to help in the tidying up of old data. Hopefully going forward we shouldn't be getting into these tangles!)
Hope to hear from somebody soon
And stay safe out there!
Best
Ellison
I've got 1 table [called old] which has 2 fields: SKU_old and the associated drawing numbers: drawing_ref
And the other table [called new] which 1 field: SKU_new
I can see how to set up the relationship so that the there is a one to many relationship between the SKU_old and SKU_new from the different tables.
And I have managed to set up a query which will cross reference which records from SKU_new are also in the old table & show the corresponding drawing numbers.
BUT.... (and here's the but haha!)
I would like to do a query as above but rather than where the SKU_old EQUALS the SKU_new, I'd like to be able to find records which CONTAIN or maybe even BEGIN or ENDS WITH
Excuse the capitals, I've been looking into boolean expressions to see if this would help lol
Hope this may help:
OLD TABLE
id | SKU_old | drawing_ref |
1 | ABC123 | 54-LP1682 |
2 | ABC123 | HMPP-14 |
3 | ABC123 | 9999424 |
NEW TABLE
ID | SKU_new |
1 | ABC123 |
2 | BC12 |
3 | ABC12 |
At the moment, the only way that I can query this is where the SKU_old on the new table *equals* the SKU_new on the new table. As per Line ID 1 on the new table.
But is it also possible to design the query so that access will generate results for:
New Line ID 2: where the SKU_new is *contained* in the SKU_old? i.e. BC12 is contained in ABC123 & show the drawing numbers?
New Line ID 3: same except for the ABC12 "begins with"
So in an ideal world, the results of my query would look something like this:
RESULTS TABLE
ID | SKU_new | "extended match" on SKU_old | drawing_ref |
1 | ABC123 | ABC123 | 54-LP1682 |
2 | ABC123 | ABC123 | HMPP-14 |
3 | ABC123 | ABC123 | 9999424 |
4 | BC12 | ABC123 | 54-LP1682 |
5 | BC12 | ABC123 | HMPP-14 |
6 | BC12 | ABC123 | 9999424 |
7 | ABC12 | ABC123 | 54-LP1682 |
8 | ABC12 | ABC123 | HMPP-14 |
9 | ABC12 | ABC123 | HMPP-14 |
Huge apologies if I'm mangling some of the terminology...
(By the way, this is all to help in the tidying up of old data. Hopefully going forward we shouldn't be getting into these tangles!)
Hope to hear from somebody soon
And stay safe out there!
Best
Ellison