Is there any way to put multiple values for a column in WHERE
?
For example product A has been replaced by product B,
product 2933 by 4044, the product 2599 by the 7845, and the product 5987 by 9432.
Example:
where DepartureDate between '20161120' and '20161120'
AND datediff(day, DataVersao, DepartureDate) between 0 and 100
and Segment = 'VCPCNF'
and Produto in ('2933','4044')
and Produto in ('5987','9432')
and Produto in ('2599','7845')
What happens is that I have 30 days of sale of the product 2933 but on the tenth day it changes its number code to 4044. When I put in a table to analyze the sales result, I have half in the 2933 and half in the 4044. I give the two results together and Product in ('2933', '4044') and I have complete.
But in my case I want it to bring the result of product 2933 which was replaced by product 4044. Then bring the result of product 5987 which was replaced by the result of the number 9432. Then bring the result of product 2599 which was replaced by the result of the number 7845. Bring it in one go without having to be running one by one. So I separated as ('2933', '4044'), ('5987', '9432') and ('2599', '7845')