problem in useing LIKE in Enter_Query Mode [message #142023] |
Thu, 13 October 2005 03:56 |
esmat_shoja
Messages: 8 Registered: August 2005
|
Junior Member |
|
|
hi all
in my form i had this:
in execute_query trigger i have:
-----------------------------------------------------------------
if :system.mode='ENTER-QUERY' then
set_block_property('block_name',default_where,make_search_str);
end if;
EXECUTE_QUERY(NO_VALIDATE);
-----------------------------------------------------------------
FUNCTION [b]make_search_str [/b]RETURN char IS
str varchar2(1000);
BEGIN
if :number_item is not null then
str:=str || ' col1='||:number_item ||' and';
end if;
if :NAME is not null then
str:=str ||' name like ''%' ||:name ||'%'' and';
end if;
str=substr(str,1,length(str)-3);
return(str);
END;
but when I enter F7 anf fill :name then I enter F8 ,no record ?
any help woul be appteciated.
Upd-mod: Add code tags
[Updated on: Thu, 13 October 2005 18:18] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
Re: problem in useing LIKE in Enter_Query Mode [message #142542 is a reply to message #142541] |
Sat, 15 October 2005 04:51 |
naveednt
Messages: 34 Registered: October 2005 Location: Karachi, Pakistan
|
Member |
|
|
user takes the form into enter-query mode by pressing F7
after that user writes down a value in a field (let suppose ENAME),
user entered 'SMI' in field ENAME
before executing query you changed the default where condition of block into
where ENAME like '%SMI%'
+ values that are written in the field on screen
so at last we have two conditions in the where clause
where ename like '%SMI%'
and ename = 'SM'
|
|
|
|