I want to use a list of arbitrary numbers as a sort of input to a select. Option A, of course, is to create a temporary table that contains just the values (e.g., 1,2,3).
I hope that you folks know what Option >A is.
Suppose the statement is like:
select Fx,
XXXXXX as Foo
from MyTable
where MyTest depends on each XXXXXX
So if I could magically make XXXXXX a list of values (1,2,3), I'd have a resultset like:
My val | Foo
-------+---
cat | 1
mouse | 2
cheesecake | 3
Again, I could source the inputs from a table, but I prefer not to if it's not necessary. Gurus, please chime in.
TIA.