Find Record with Default Where [message #411837] |
Tue, 07 July 2009 02:17 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shahzaib_4vip@hotmail.com
Messages: 410 Registered: December 2008 Location: karachi
|
Senior Member |
|
|
Hellow All
I Create a Simple Employee Form
With 2 Column User_id and User_Name with 20 Record display at a time
I also have 1 Button which name is OK and 2 Other Text item which name is Code and Name with 1 Record display at a time (Not a Database item)
Now i need when i press button ok
Its search Record of User_id and User_name which User_id like Code and User_name like name
i Try Default Where and success to find only those record which user_id like Code
SET_BLOCK_PROPERTY('Block53', DEFAULT_WHERE, 'User_id like ''' || :block70.code || '%''');
go_block('block53');
EXECUTE_QUERY;
Its find all record which User_id like code now i need to find all Record in Block53 where user_id like code and user_name like name
Do you have any idea
Regards
Shahzaib
|
|
|
Re: Find Record with Default Where [message #411851 is a reply to message #411837] |
Tue, 07 July 2009 02:48 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
DEFAULT_WHERE is just another WHERE clause, so it has to follow rules that apply to it.
Your current WHERE clause looks like this:where user_id like code || '%'
If you want to expand it to "name", no problem:where user_id like code || '%'
and user_name like name || '%' (or possibly "like '%' || name || '%'" or ...).
So, you'll have to do the same with the DEFAULT_WHERE - expand it with "and user_name like ..." part of the clause.
|
|
|