I have a simple query in which I'm retrieving all sales orders of a certain type.
WHERE SalesOrders.OrderType IN ('10','15','18')
Suppose instead of specifying the OrderType values in the WHERE clause, I want to store them in a variable prior to the SELECT statement and reference the variable in the WHERE (or in a JOIN) instead. What is the best way to handle this?
I greatly appreciate any assistance.