I am stuck at the following issue writing a SELECT SQL statement and was wondering if anyone can help. I have the following table with ProductID and Status fields:
| ProductID | Status |
|---|---|
| AP56546 | |
| AP56546 | Shipped |
| AP56546 | |
| AD92402 | Delayed |
| AD92402 | |
| AD92402 | |
| BE91455 | |
| BE91455 | |
| SL19423 | |
| SL19423 | |
| SL19423 | |
| SL19423 | Expected |
How can I populate the Status for all Product with the same ID if even one of them has a status against it? If no Status exists for a certain product, then it can stay null. How can I do this using a SELECT statement? The expected result should be below (ProductID BE91455 is still null because there is no status against any of the rows where it occurs)
| ProductID | Status |
|---|---|
| AP56546 | Shipped |
| AP56546 | Shipped |
| AP56546 | Shipped |
| AD92402 | Delayed |
| AD92402 | Delayed |
| AD92402 | Delayed |
| BE91455 | |
| BE91455 | |
| SL19423 | Expected |
| SL19423 | Expected |
| SL19423 | Expected |
| SL19423 | Expected |
Thank you
MAX?