-
Hi all,
I am trying to set the "default where " clause dynamically using set_block_property builtin .My code likes this....
set_block_property(blk_id, default_where,'VW_CASEADDRESS_CASEMAIN.CSM_CASENO'||' '||'like'||' '||'(:CTRBLK.CASE_NUMBER%)');
The Error says "Unable to fetch records" and its not identifying "%"........it says invalid character.
Can anybody please solve it.
Thanks
saritha
-
Try to separate "%" out of the ":CTRBLK.CASE_NUMBER%" and use "||" to concatenate the "%".
HTH
Thanks
-
Originally posted by mber
Try to separate "%" out of the ":CTRBLK.CASE_NUMBER%" and use "||" to concatenate the "%".
HTH
Thanks
Hi,
I tried different ways to do that it doesn't show be error but it doesn't do what asked to do....
whereclause varchar2(80):='VW_CASEADDRESS_CASEMAIN.CSM_CASENO'||' '||'like'||' '||''':CTRBLK.CASE_NUMBER''''%''';
This is what I tried but it didn't work .....
how should I didplay normal where cluase
-
To display WHERE CLAUSE at any point of time, use:
MESSAGE('Default Where Is : '||GET_BLOCK_PROPERTY(default_where, block_name) ) ;
When you are dynamically setting the WHERE Clause for a block, you dont need to the block name (i.e. just use Field_Name and no need to use Block_Name.Field_Name)
Try to concatenate % as HTH suggested.
Hope this will help.
-
Pinakin
get_block_property(BLOCK_NAME, default_where);
you DO need the block name if you are concatenating a value from an item in another block:
set_block_property('PEOPLE',default_where,'name like ''%'||:control_block.text_item6||'%''');
go_block('PEOPLE');
execute_query;
This code DOES WORK - I JUST TRIED IT.
Oracle DBA and Developer
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
|