I have this query:
select BUnit, value from myTable where BUnit in (555,556,557,558)
and these values for Bunit are constructed dynamically, ie. a program builds queries on demand, and they won’t always select these numbers.
A possible query result would be
Bunit value
556 10.2
558 5.18
However, I would like to construct a select statement to return
Bunit value
556 10.2
558 5.18
555 NULL
557 NULL
I am not allowed to create tables (temporary or not) and to create procedures. How can I do it?
You can build a table with the criteria, and join on that: