DEFAULT WHERE CLAUSE
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: DEFAULT WHERE CLAUSE

Hybrid View

  1. #1
    Join Date
    Jun 2001
    Posts
    109

    Question

    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

  2. #2
    Join Date
    Oct 2000
    Posts
    123
    Try to separate "%" out of the ":CTRBLK.CASE_NUMBER%" and use "||" to concatenate the "%".

    HTH

    Thanks

  3. #3
    Join Date
    Jun 2001
    Posts
    109
    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

  4. #4
    Join Date
    Sep 2000
    Posts
    47
    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.


  5. #5
    Join Date
    Aug 2000
    Posts
    462
    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
  •  


Click Here to Expand Forum to Full Width