|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi
Does anyone know if I can use DECODE in an IN clause to do the following: select x from table where code = (parm_value, NULL, code, parm_value) In the parameter value I want to specify a list of values to compare against code. I have tried putting brackets around parm_value but this doesn't work. thanks. |
|
#2
|
|||
|
|||
|
I think you can use it , check out the follwoing example:
SELECT empno,ename,sal,deptno FROM emp WHERE deptno in (90,40,decode(deotno,10,10,20)) / |
|
#3
|
|||
|
|||
|
Hi
Thanks for that but I don't think its exactly what I want - I need to pass in a parameter which contains a list of values or it can be NULL. Where it contains a list of values I want all of them to be used for the IN CLAUSE so if the parameter was (1, 2, 3, 4) the IN CLAUSE would check against all 4 values? thanks, Monica. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Using decode in IN clause |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|