How do you use wild card in a stored procedure?
In a regular select statment the following works:
select a.project_id, b.dev_id, b.dev_name, c.project_name, c.project_start_date
from di_proj_dev a, di_developer b, di_project c
where a.dev_id = b.dev_id and
a.project_id = c.project_id and
b.dev_name like '%John%';
- all John's are retrieved
HOWEVER, in a stored procedure the following doesn't work:
select a.project_id, b.dev_id, b.dev_name, c.project_name, c.project_start_date
from di_proj_dev a, di_developer b, di_project c
where a.dev_id = b.dev_id and
a.project_id = c.project_id and
b.dev_name like '%p_ID%' ;
- nothing is retrieved
(p_ID is passed in from a com object. When "like '%p_ID%'" is changed to "= p_ID" and a full name is typed it works - but why won't the wild card work?
thanks,
In a regular select statment the following works:
select a.project_id, b.dev_id, b.dev_name, c.project_name, c.project_start_date
from di_proj_dev a, di_developer b, di_project c
where a.dev_id = b.dev_id and
a.project_id = c.project_id and
b.dev_name like '%John%';
- all John's are retrieved
HOWEVER, in a stored procedure the following doesn't work:
select a.project_id, b.dev_id, b.dev_name, c.project_name, c.project_start_date
from di_proj_dev a, di_developer b, di_project c
where a.dev_id = b.dev_id and
a.project_id = c.project_id and
b.dev_name like '%p_ID%' ;
- nothing is retrieved
(p_ID is passed in from a com object. When "like '%p_ID%'" is changed to "= p_ID" and a full name is typed it works - but why won't the wild card work?
thanks,