I have an Oracle query in which I would like to apply the UPPER function to all the values in the IN condition, instead of explicitly calling UPPER on each value, ex.
SELECT * FROM a WHERE b IN UPPER(v1, v2, v3, v4);
instead of
SELECT * FROM a WHERE b IN (UPPER(v1), UPPER(v2), UPPER(v3), UPPER(v4));
Any help would be most appreciated.
You can do (almost) that by turning off case sensitivity:
alter session set NLS_COMP=ANSI;
alter session set NLS_SORT=BINARY_CI;
select * from A where B in (v1, v2, v3, v4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With