I am having trouble on how to best accomplish an update that needs to be made on incoming products. There is an image of my query in this zip file
Text file.zip
This is my select query of information from two different tables. I am trying to update any record with region 12, 12 and 00, but it can only be those combinations. I want to change the priority code to H for any of these combinations. My problem is that there are duplicate distro IDs because there are multiple regions possibly for each distro ids. For example if the distro ID has multiple regions with say region 2,4,10, I want to exclude those from my update to the priority code. Another example is if I have a only a singular Distro ID with the region 12 I want to update that to prioriy code H if it is not already H. Another example would be if a Distro ID has region 12 and has region 00 together, I want to update that Distro to H. My biggest problem is that there are multiple of the same distro ID that have different quantities for each region. I am looking for a way to work around this problem? Thank you for taking the time to read my thread. Any help would be apprciated.
Thanks,
Nick