package queries

const GetProductColors = `
DECLARE @ProductCode VARCHAR(30) = @p1;

SELECT DISTINCT
    p.ProductCode,
    v.ColorCode,
    ISNULL(cd.ColorDescription, '') AS ColorDescription
FROM ProductFilterWithDescription('TR') AS p
INNER JOIN prItemVariant AS v
    ON v.ItemCode = p.ProductCode
LEFT JOIN cdColorDesc AS cd
    ON cd.ColorCode = v.ColorCode
    AND cd.LangCode = 'TR'
WHERE 
    p.ProductCode = @ProductCode
    AND ISNULL(v.ColorCode, '') <> ''
ORDER BY v.ColorCode;
`
