Comparing a varchar and number [message #969] |
Sat, 16 March 2002 10:02 |
KK
Messages: 24 Registered: March 2002
|
Junior Member |
|
|
Hi!!
I have a variable which contains the following dept info:
v_dept = (1010,1011,1012)
**v_dept is a varchar2(500)**
**v_dept contains all the depts**
I want to compare this to the dept.dept_no to get the dept name.
**dept.dept_no is a number**
This is what I am trying to do:
select dept.dept_name
from dept
where dept.dept_no in (v_dept)
and dept.type = 'A';
I want to search through all the values in the variable - v_dept and only return those that have a dept type = 'A'. How do I compare a number to a character?
Any suggestions would be greatly appreciated!! Thanks!!
|
|
|
|