Hi.
I'm still learning about SQL and need assistance with something.
- I have a one to many relationship from our SKU Repository (SKU_STAGING) to our Area Repository (AREA_STAGING) using SKU Number as the join.
- Area consists of up to thirty records with varying status values. When all of those status fields turn to 'Discontinued', it would be beneficial for us to receive an email from PIM that tells us that the SKU is 100% discontinued and can be removed from various hierarchies.
- If one status still is not set to Discontinued, it can't be in the report that I want to generate.
Any ideas? Here's my start.
SELECT s.internalRecordId
FROM SKU_STAGING s
JOIN AREA_STAGING a ON s.SKU_Number = a.SKU_Number
WHERE a.Status = 'Discontinued'
Thanks in advance!
Best,
-Jon
------------------------------
Jonathan Varo | Manager - PIM Group
Fender Musical Instruments Corporation | 480-845-5823
------------------------------