retriving the data according to where clause [message #468557] |
Fri, 30 July 2010 11:49 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Amar_bu
Messages: 32 Registered: July 2010 Location: riyadh
|
Member |
|
|
Hi
I want if the user write for example in text box 'AM TK'
the query display the resualt which has am alone
tk alone, and that has both. I know that i should use the Like with % but i do not know how to write it in the set property.
I have wrote
set_block_property('Employee_Other',default_where,'Upper(name) like '''||UPPER(:key_search.person_name)||'''') ;
This will bring the resualt just if the user write am tk. How i can modify it to return value as i explained above. thanks
|
|
|
|
|
Re: retriving the data according to where clause [message #468577 is a reply to message #468557] |
Fri, 30 July 2010 14:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Amar_bu
Messages: 32 Registered: July 2010 Location: riyadh
|
Member |
|
|
set_block_property('Employee_Other',default_where,'Upper(name) like '''||'%'||UPPER(:key_search.person_name)||'%'||'''
or UPPER(office_name) Like '''||UPPER(:key_search.office_name)||''' or UPPER(other_types) like '''||UPPER(:key_search.other_type)||''' or UPPER(INFO_TEXT_En) like '''||UPPER(:key_search.information)||'''') ;
I have concatenate the % with the person name but it cause another problem it seems that the rest of line will be ignored.
|
|
|
|
|
Re: retriving the data according to where clause [message #468654 is a reply to message #468600] |
Sat, 31 July 2010 16:30 ![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 |
|
|
If that's the case, perhaps you could create a local variable (within the trigger) and put code that is supposed to act as a WHERE clause into that variable. Then display it (either in an item you'll create on the screen, or using the MESSAGE built-in). It might show why it isn't working as you'd like it to.
|
|
|