I have a table with products priorities per market and in case a market is not defined a default priority with market = NULL. For example:
market - product_id - priority NULL - 101 - 1 NULL - 201 - 2 NULL - 103 - 3 DE - 101 - 2 DE - 103 - 1 DE - 201 - 3 US - 101 - 1 US - 103 - 2
I need a query which gives me all product priorities for a given market but in case this market is not defined in the table then the default values with market = null. When I use WHERE market = 'DE' OR market IS NULL I get both, the entries for DE and NULL, but how to use the WHERE clause to get only DE if it is configured?
Thank you very much for any help!
Aucun commentaire:
Enregistrer un commentaire