Hi Forum. I just signed up. Looking for a solution to the following problem:
I have a partially completed query called 'qNew_Prods' and a static table 'tbVendorColors'. I need to populate a field called 'color' for my final query using the tbVendorColors table. 95% of our vendors are consistent in including a color code 'at the end' of the product id or SKU. The other 5% I'm ignoring as they just generate their products IDs or SKUs randomly and have no consistency or pattern.
I have included a sample of the query and table for more clarity. A couple of things to emphasize; 1) The vendor is identifiable from the SKU and that narrows down the selection of colors in the tbVendorColors table; 2) The end of the SKU always have the color code of the product; 3) as you can see from the samples, the color codes vary from 1 digit to 3 digits in either numbers, letters or combination of both and they dont always have a delimiter such as the dash or period ("-","."). I have been experimenting with some queries, but they only cover a small percentage and we always end up doing this task manually, which is a pain when we received thousands of products for more than 80 vendors. Any help/assistance will be greatly appreciated.
I have a partially completed query called 'qNew_Prods' and a static table 'tbVendorColors'. I need to populate a field called 'color' for my final query using the tbVendorColors table. 95% of our vendors are consistent in including a color code 'at the end' of the product id or SKU. The other 5% I'm ignoring as they just generate their products IDs or SKUs randomly and have no consistency or pattern.
I have included a sample of the query and table for more clarity. A couple of things to emphasize; 1) The vendor is identifiable from the SKU and that narrows down the selection of colors in the tbVendorColors table; 2) The end of the SKU always have the color code of the product; 3) as you can see from the samples, the color codes vary from 1 digit to 3 digits in either numbers, letters or combination of both and they dont always have a delimiter such as the dash or period ("-","."). I have been experimenting with some queries, but they only cover a small percentage and we always end up doing this task manually, which is a pain when we received thousands of products for more than 80 vendors. Any help/assistance will be greatly appreciated.
qNew_Prods | tbVendorColors | |||||
vendor | SKU | color | vendor | colorcode | color | |
V01 | R29853.000 | white | V01 | 000 | white | |
V03 | DD957-BL | black | V01 | 002 | almond | |
V02 | IF9795U-295 | gold | ... | |||
V04 | NBU538Y | yellow | V02 | 295 | gold | |
V05 | Y39IOGR2 | thunder gray | V05 | GR2 | thunder gray | |
... | V04 | Y | yellow | |||
... | V03 | BL | black |