|
-
I have createt a testtable. It looks like this
SQL> select * from testtable;
ID CAR DOORS
----------- ---------
1 BMW 4
2 MERCEDES 4
3 LOTUS 2
Now I try to execute my "search procedure" on that table.
procedure car(
spalten_in in varchar2,
searchtext_in in varchar2,
car_cv_inout IN OUT sys_refcursor)
is
begin
stmt := 0;
open car_cv_inout for
'select myrow from (select rownum myrow,:s from testtable order by car asc)
where lower(:s) = lower(:search)' USING in spalten_in,spalten_in,searchtext_in;
end car;
In SQL Plus I created a var cv refcursor to get the result of this procedure.
After that I execute the procedure with
exec car('CAR','BMW',:cv);
And i checked the result with print cv. But there is always: "no rows selected" (as in PHP)
If I start the Query without the procedure like this:
select myrow from (select rownum myrow,CAR from testtable order by car asc)where lower(CAR) = lower('BMW');
Then it works fine.
But I can't find the error, why this procedure always shows no rows.
Can somebody help me?????
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|