Function used in SQL query not showing the desired results

I have created a function that gives me the client id but when i am using the function in the query its not giving me any result i.e. 0 rows but if I execute the function sepreatly and put the result of that function in the qurey it is giving me the desired result please have a look on the following and please reply with you expert opinion:
FUNCTION CODE:
create or replace function j2
(usid in varchar2)
return varchar2
is
cidn_in varchar2(4000) := '';
ls_sep varchar2(1) := ',';
cursor predicate_cidn
is
select
logical_schema_id
from
CLIENT_REGISTRY cr,
MEMBER_ROLE_CLIENT_ASSIGNMENT mrca,
MEMBER m
where
mrca.base_client_id = cr.base_client_id and
mrca.member_id = m.member_id and
cr.schema_in_use_in = '1' and
m.active_status_id = 'A' and
upper(mrca.member_id) = upper(usid);
BEGIN
for GET_CIDN in predicate_cidn
loop
cidn_in := cidn_in || ls_sep || '''' || GET_CIDN.logical_schema_id || '''';
end loop;
cidn_in := substr(cidn_in, 2);
cidn_in := '('||cidn_in||')';
--dbms_output.put_line(cidn_in);
return cidn_in;
END ;
SQL> select j2('qaa@adp') from dual;
J2('QAA@ADP')
('BASE18','SDK1TEST','SEETHA1CONFIG','BASE09','KAREN2','SIVACONFIG','BASE19','SD
K1CTEST','VASU1','KAREN5','EVENTS1CTEST','SDK1','ADA1CONFIG','BASE10','VRB1CONFI
G','CRU2CONFIG','BASE20','SIVATEST','PCOMCONFIG','KP1CONFIG','KAREN4CONFIG','EVE
NTS1TEST','SUZ3CONFIG','DONG2CONFIG','ED2CONFIG','SIVACTEST','APDCONFIG','EVENTS
1CONFIG','ESSCONFIG','SIVA','SDK2CONFIG','ED3CONFIG','RAJ4CONFIG','CBRCONFIG','N
AMRATA2CONFIG','EMIL1','NAMRATA1CONFIG','SDK2CTEST','BVT2CONFIG','MURUGAN1CONFIG
','COB1CONFIG','GABY1TEST','CHR1CONFIG','ED4CONFIG','USE1CONFIG','SDK2TEST','DEM
O1CONFIG','BERNIE1CONFIG','XA1','CAR2TEST','SDK2','ED5CONFIG','PAY1TEST','PAYXCO
NFIG','KP1TEST','SEAN1CONFIG','CAR2CTEST','VASU1CONFIG','SEAN2CONFIG','KP1CTEST'
,'MAU1CONFIG','CONWCONFIG','PAN1CONFIG','MERAJ2','PRA3CONFIG','SEAN5CONFIG','KP1
','PRA4CONFIG','CAR2CONFIG','PRA2CONFIG','SEAN6CONFIG','PRA3TEST','RPT','GABY1CT
EST','SDK3CONFIG','PRA2TEST','SEAN9CONFIG','CAR2','LV1CONFIG','PRA3CTEST','DONG1
CONFIG','TE1CONFIG','MERAJ2CONFIG','VIV1CONFIG','GABY1','SEAN2','PRA2CTEST','PRA
3','RPTCONFIG','PRA4CTEST','SEAN3','MITA1CONFIG','PRA2','RPTCTEST','PCOM1CONFIG'
,'SS2CONFIG','PAY1CONFIG','SEAN7','ANNCONFIG','BASE11','BASE02','LV2CONFIG','RPT
TEST','IMPECONFIG','SUR1CONFIG','SREEK2CONFIG','BASE03','SRINU3CONFIG','BDCONFIG
','JAY1CONFIG','AMMAN1','PRA1TEST','WPGCONFIG','BASE12','MP5CONFIG','MERAJ1','SR
INU2CONFIG','XA1CONFIG','RAJ1CONFIG','WPGCTEST','BASE04','CHRIS','RAJSCONFIG','P
ANKAJ','BASE13','WPGTEST','RAJ3CONFIG','WPG','BASE14','VASU2CONFIG','SRINU1CONFI
G','BASE05','PRA4TEST','VASU1TEST','PRA5CONFIG','NISH1CONFIG','CHRISCONFIG','SDK
3TEST','RAJ3TEST','KP2CONFIG','BASE06','DEFPCONFIG','NISH2CONFIG','CHRISCTEST','
WPSCONFIG','VASU2TEST','BASE15','GABY1CONFIG','PRA5TEST','MITA2CONFIG','BASE07',
'VASU1CTEST','KP2TEST','VASU2CTEST','LAURA3CONFIG','BASE16','CHRISTEST','WPSTEST
','VASU2','KP2CTEST','EVENTS1','BASE17','RAJ2CONFIG','WPSCTEST','BASE08','SREEK1
CONFIG','ADVE','PRA4','SDK1CONFIG','KP2','KAREN1','CRU1CONFIG','WPS')
Now if i put the results (cut and paste )in the query it gives me the results
SQL> select count(*) from baseclient.address_detail where cidn in ('BASE18','SDK1TEST','SEETHA1CONFIG','BASE09','KAREN2','SIVACONFIG','BASE19','SD
2 K1CTEST','VASU1','KAREN5','EVENTS1CTEST','SDK1','ADA1CONFIG','BASE10','VRB1CONFI
3 G','CRU2CONFIG','BASE20','SIVATEST','PCOMCONFIG','KP1CONFIG','KAREN4CONFIG','EVE
4 NTS1TEST','SUZ3CONFIG','DONG2CONFIG','ED2CONFIG','SIVACTEST','APDCONFIG','EVENTS
5 1CONFIG','ESSCONFIG','SIVA','SDK2CONFIG','ED3CONFIG','RAJ4CONFIG','CBRCONFIG','N
6 AMRATA2CONFIG','EMIL1','NAMRATA1CONFIG','SDK2CTEST','BVT2CONFIG','MURUGAN1CONFIG
7 ','COB1CONFIG','GABY1TEST','CHR1CONFIG','ED4CONFIG','USE1CONFIG','SDK2TEST','DEM
O1CONFIG','BERNIE1CONFIG','XA1','CAR2TEST','SDK2','ED5CONFIG','PAY1TEST','PAYXCO
8 9 NFIG','KP1TEST','SEAN1CONFIG','CAR2CTEST','VASU1CONFIG','SEAN2CONFIG','KP1CTEST'
10 ,'MAU1CONFIG','CONWCONFIG','PAN1CONFIG','MERAJ2','PRA3CONFIG','SEAN5CONFIG','KP1
11 ','PRA4CONFIG','CAR2CONFIG','PRA2CONFIG','SEAN6CONFIG','PRA3TEST','RPT','GABY1CT
12 EST','SDK3CONFIG','PRA2TEST','SEAN9CONFIG','CAR2','LV1CONFIG','PRA3CTEST','DONG1
13 CONFIG','TE1CONFIG','MERAJ2CONFIG','VIV1CONFIG','GABY1','SEAN2','PRA2CTEST','PRA
14 3','RPTCONFIG','PRA4CTEST','SEAN3','MITA1CONFIG','PRA2','RPTCTEST','PCOM1CONFIG'
15 ,'SS2CONFIG','PAY1CONFIG','SEAN7','ANNCONFIG','BASE11','BASE02','LV2CONFIG','RPT
16 TEST','IMPECONFIG','SUR1CONFIG','SREEK2CONFIG','BASE03','SRINU3CONFIG','BDCONFIG
17 ','JAY1CONFIG','AMMAN1','PRA1TEST','WPGCONFIG','BASE12','MP5CONFIG','MERAJ1','SR
18 INU2CONFIG','XA1CONFIG','RAJ1CONFIG','WPGCTEST','BASE04','CHRIS','RAJSCONFIG','P
19 ANKAJ','BASE13','WPGTEST','RAJ3CONFIG','WPG','BASE14','VASU2CONFIG','SRINU1CONFI
20 G','BASE05','PRA4TEST','VASU1TEST','PRA5CONFIG','NISH1CONFIG','CHRISCONFIG','SDK
21 3TEST','RAJ3TEST','KP2CONFIG','BASE06','DEFPCONFIG','NISH2CONFIG','CHRISCTEST','
22 WPSCONFIG','VASU2TEST','BASE15','GABY1CONFIG','PRA5TEST','MITA2CONFIG','BASE07',
23 'VASU1CTEST','KP2TEST','VASU2CTEST','LAURA3CONFIG','BASE16','CHRISTEST','WPSTEST
24 ','VASU2','KP2CTEST','EVENTS1','BASE17','RAJ2CONFIG','WPSCTEST','BASE08','SREEK1
25 CONFIG','ADVE','PRA4','SDK1CONFIG','KP2','KAREN1','CRU1CONFIG','WPS');
COUNT(*)
228
BUT if I user the function it gives me no results
0 rows selected and its taking a loon time to reurn

This appears to be a duplicate of the question in this thread
Re: VPD issue Need Assistance ASAP
where I wrote
"Your function returns a single string that happens to have a bunch of commas and quotes in it. An IN list generally requires a list of strings, which your function doesn't return.
You could rewrite the function to be a pipelined table function and then do
select count(*)
from baseclient.address_detail
where cidn in (SELECT cidn
FROM TABLE(<<your pipelined table function>>))
However, I would expect it to be easier not to wrap all this into a function and just have your IN clause be the logic in your predicate_cidn cursor.
Justin
"

Similar Messages

  • Query:  Not getting the desired result. Please help

    QL> select * from ecev;
    entity_Tag
    7
    8
    9
    10
    1
    2
    3
    4
    5
    6
    SQL> select * from dg;
    DIGP_TAG CEPT_TAG
    600 1
    700 1
    800 1
    900 1
    100 1
    200 1
    500 1
    75 2
    SQL> select * from enow;
    ENTITY_CODE ENTITY_TAG DIGP_TAG TARGET_DA CEPT_TAG
    EXT 7           600      26-MAY-07 1
    EXT 8           700      26-MAY-07 1
    EXT 9           800      26-MAY-07 1
    EXT 10           800      22-APR-76 1
    EXT 1           100      20-OCT-06 1
    EXT 2           200      20-OCT-06 1
    EXT 3           500      20-OCT-06 1
    EXT 4           100      20-OCT-06 1
    EXT 5           100      20-OCT-06 1
    EXT 6           80      20-OCT-06 1
    EXT 1           75           2
    SQL> select * from tk;
    TK_TAG DIGP_TAG NARRATIVE DUE_DATE CEPT_TAG
    35 90 raj 27-MAY-07               1
    36 900 kkd 27-MAY-07               1
    37 100 kim 28-MAY-07               1
    30 100 ram 23-MAY-07               1
    31 100 kish 23-MAY-07               1
    32 200 mar 23-MAY-07               1
    33 100 gy 23-MAY-07               1
    34 100 mm 27-MAY-07               1
    8 rows selected.
    For the following query
    1 select
    2 d.ecev_tag ecev_tag,
    3 a.digp_tag entity_owner ,
    4 c.digp_tag task_owner,
    5 c.tk_tag task_tag,
    6 c.narrative
    7 from enow a,
    8 entl b,
    9 tk c,
    10 ecev d
    11 where ( a.DIGP_TAG=100 or c.digp_tag=100)
    12 and a.entity_tag=b.entity_tag(+)
    13 and b.tk_tag=c.tk_tag(+)
    14* and a.entity_tag=d.entity_tag
    SQL> select * from entl;
    TK_TAG ENTITY_TAG
    35 5
    36 10
    30 1
    31 1
    32 2
    33 3
    34 3
    Result:
    I get
    entity_tag ENTITY_OWNER TASK_OWNER TASK_TAG NARRATIVE
    5 100 90 35 raj          row1
    1 100 100 30 ram          row2
    1 75 100 30 ram          row3 1 100 100 31 kish          row4
    1 75 100 31 kish          row5 3 500 100 33 gy          row6
    3 500 100 34 mm          row7
    4 100                              row8
    Row1: yes, since entity_tag 5 is owned by digp_tag 100 (enow)
    Row2: yes, since entity_tag 1 is owned by digp_tag 100 (enow)
    Row3: NO, since entity_tag 1 is owned by digp_tag 75, which in turn is in cept_tag 2, since the passed digp_tag is 100 and it just belongs to cept_tag 1 we should not be getting this row.
    Row4: Yes, since tk_tag 31 is owned by digp_tag 100 (tk)
    Row5 NO, since entity_tag 1 is owned by digp_tag 75, which in turn is in cept_tag 2 since the passed digp_tag is 100 and it just belongs to cept_tag 1 we should not be getting this row.
    Row6: Yes, since tk_tag 33 is owned by digp_tag 100 (enow)
    Row7: Yes, since tk_tag 34 is owned by digp_tag 100(enow)
    Row8: Yes, since entity_tag 4 is owned by 100(enow
    I guess i have to join dg.cept_tag and a.cept_tag, but it is not working.....
    Can somebody understand this and help...
    Thanks
    Ram

    QL> select * from ecev;
    entity_Tag
    7
    8
    9
    0
    1
    2
    3
    4
    5
    6
    SQL> select * from dg;
    DIGP_TAG CEPT_TAG
    600 1
    700 1
    800 1
    900 1
    100 1
    200 1
    500 1
    75 2
    SQL> select * from enow;
    ENTITY_CODE ENTITY_TAG DIGP_TAG
    TARGET_DA CEPT_TAG
    EXT 7
              600      26-MAY-07 1
    8           700
         26-MAY-07 1
    EXT 9
              800      26-MAY-07 1
    10           800
         22-APR-76 1
    EXT 1
              100      20-OCT-06 1
    2           200
         20-OCT-06 1
    EXT 3
              500      20-OCT-06 1
    4           100
         20-OCT-06 1
    EXT 5
              100      20-OCT-06 1
    6           80
         20-OCT-06 1
    EXT 1
              75           2
    L> select * from tk;
    TK_TAG DIGP_TAG NARRATIVE DUE_DATE
    CEPT_TAG
    35 90 raj 27-MAY-07               1
    36 900 kkd 27-MAY-07               1
    37 100 kim 28-MAY-07               1
    30 100 ram 23-MAY-07               1
    31 100 kish 23-MAY-07               1
    32 200 mar 23-MAY-07               1
    33 100 gy 23-MAY-07               1
    34 100 mm 27-MAY-07               1
    8 rows selected.
    For the following query
    1 select
    2 d.ecev_tag ecev_tag,
    3 a.digp_tag entity_owner ,
    4 c.digp_tag task_owner,
    5 c.tk_tag task_tag,
    6 c.narrative
    7 from enow a,
    8 entl b,
    9 tk c,
    10 ecev d
    11 where ( a.DIGP_TAG=100 or c.digp_tag=100)
    12 and a.entity_tag=b.entity_tag(+)
    13 and b.tk_tag=c.tk_tag(+)
    14* and a.entity_tag=d.entity_tag
    SQL> select * from entl;
    TK_TAG ENTITY_TAG
    35 5
    36 10
    30 1
    31 1
    32 2
    33 3
    34 3
    sult:
    I get
    entity_tag ENTITY_OWNER TASK_OWNER TASK_TAG
    NARRATIVE
    5 100 90
    35 raj          row1
    100 100 30
    ram          row2
    75 100
    30 ram          row31 100 100
    31 kish          row4
    75 100
    31 kish          row5
    3 500 100
    33 gy          row6
    500 100 34
    mm          row7
    100                              row8
    1: yes, since entity_tag 5 is owned by digp_tag 100
    (enow)
    Row2: yes, since entity_tag 1 is owned by digp_tag
    100 (enow)
    Row3: NO, since entity_tag 1 is owned by digp_tag 75,
    which in turn is in cept_tag 2, since the passed
    digp_tag is 100 and it just belongs to cept_tag 1 we
    should not be getting this row.
    Row4: Yes, since tk_tag 31 is owned by digp_tag 100
    (tk)
    Row5 NO, since entity_tag 1 is owned by digp_tag 75,
    which in turn is in cept_tag 2 since the passed
    digp_tag is 100 and it just belongs to cept_tag 1 we
    should not be getting this row.
    Row6: Yes, since tk_tag 33 is owned by digp_tag 100
    (enow)
    Row7: Yes, since tk_tag 34 is owned by digp_tag
    100(enow)
    Row8: Yes, since entity_tag 4 is owned by 100(enow
    I guess i have to join dg.cept_tag and a.cept_tag,
    but it is not working.....
    Can somebody understand this and help...
    Thanks
    Ram
    Result:
    I get
    entity_tag ENTITY_OWNER TASK_OWNER TASK_TAG NARRATIVE
    5 100 90 35 raj     row1
    1 100 100 30 ram     row2
    1 75 100 30 ram     row3
    1 100 100 31 kish     row4
    1 75 100 31 kish     row5
    3 500 100 33 gy     row6
    3 500 100 34 mm     row7
    4 100                    row8

  • SQL Query to get the desired result

    Can someone give the SQL to get this output.
    input is like this in table.
    cola     colb     fromdate     todate
    1     100     1/5/2010     1/9/2010
    1     101     1/10/2010     1/25/2010
    1     102     1/26/2010     12/31/2900
    2     201     3/1/2011     3/10/2011
    2     202     3/11/2011     12/31/2900
    3     301     1/5/2010     1/9/2010
    3     302     1/10/2010     1/25/2010
    3     303     1/26/2010     1/28/2010
    3     304     1/29/2010     12/31/2900
    I want to get the output like this.
    cola     colb     fromdate     todate
    1     100     1/5/2010     1/9/2010
    2     201     3/1/2011     3/10/2011
    3     301     1/5/2010     1/9/2010
    More info:
    I want to get the rows where fromdate is the min(fromdate) from each cola's unique values i.e. 1,2,3
    Please let me know the SQL.
    Thanks.
    [email protected]

    This way!!!
    with data(cola, colb, st_dt, ed_dt) as
    select 1,     100,     to_date('01/05/2010', 'MM/DD/YYYY'),     to_date('01/09/2010', 'MM/DD/YYYY') from dual union all
    select 1,     101,  to_date('01/10/2010', 'MM/DD/YYYY'),     to_date('01/25/2010', 'MM/DD/YYYY') from dual union all
    select 1,     102,     to_date('01/26/2010', 'MM/DD/YYYY'),     to_date('12/31/2900', 'MM/DD/YYYY') from dual union all
    select 2,     201,     to_date('03/01/2011', 'MM/DD/YYYY'),     to_date('03/10/2011', 'MM/DD/YYYY') from dual union all
    select 2,     202,     to_date('03/11/2011', 'MM/DD/YYYY'),     to_date('12/31/2900', 'MM/DD/YYYY') from dual union all
    select 3,     301,     to_date('01/05/2010', 'MM/DD/YYYY'),     to_date('01/09/2010', 'MM/DD/YYYY') from dual union all
    select 3,     302,     to_date('01/10/2010', 'MM/DD/YYYY'),     to_date('01/25/2010', 'MM/DD/YYYY') from dual union all
    select 3,     303,     to_date('01/26/2010', 'MM/DD/YYYY'),     to_date('01/28/2010', 'MM/DD/YYYY') from dual union all
    select 3,     304,     to_date('01/29/2010', 'MM/DD/YYYY'),     to_date('12/31/2900', 'MM/DD/YYYY') from dual
    select cola, colb, st_dt, ed_dt
      from (
            select cola, colb, st_dt, ed_dt,
                   row_number() over (partition by cola order by st_dt) rn
              from data
           ) a
    where a.rn = 1;
    COLA COLB ST_DT     ED_DT  
       1  100 05-JAN-10 09-JAN-10
       2  201 01-MAR-11 10-MAR-11
       3  301 05-JAN-10 09-JAN-10

  • Date difference is not showing the correct result for date interval

    Hi Expert,
                    I've created two formula variable one for PO date and another for GR date
    while i am taking the date difference of GR and PO date for single PO date selection
    it showing me correct result , but while i am taking the date interval for PO date it not
    showing the correct result.
    eg: PO date: 01.01.2010   for a particular PO and Gr date is suppose 03.01.2010, 06.01.2010
          it showing the result 2 and 5.
    But if i am taking date interval for PO date:
    eg: 01.01.2010 - 31.01.2010
    PO date: 10.01.2010 and GR date are suppose 15.01.2010, 22.01.2010 and 30.01.2010
    it showing me 14, 21 and 29
    Thanks and Regards
    Lalit Kumar

    Hi Expert,
                    Through replacement path.
    Thanks and Regards
    Lalit Kumar

  • ABAP Query - Not showing the required changes through Z T.Code

    Hi,
    I have a ABAP Query for OPEN DELIVERY QUANTITY (T.Code - ZABC).  I change something in QUERY and activate. After that i execute it, and saw required changes.
    But when i execute it with the T.Code - ZABC, it does not show the changes. Even i Save and Test with the SQ01 t.code.
    Please tell me, what is the problem in it. Why not showing the required changes through T.Code - ZABC.
    Regards...

    HI,
    Dear, it seems that you have changed the query in SQ02 and then just save it and not generated.
    or may be after generation again clicked on SAVE button.
    So untill unless you will not generate the query, it won't work.
    Secondly, by chanegs in the query, i don't think it changes the name of the main program.
    Regds,
    Anil

  • Progression not yielding the desired result

    Hi
    I have written a text query using the progressive relaxation method. It is not giving me the desired results. Here are the query details:
    I have created an Intermedia index on a table with following specs:
    BEGIN
    CTX_DDL.DROP_PREFERENCE('CTXSYS.COMPANY_SEARCH_MULTI');
         CTX_DDL.CREATE_PREFERENCE('CTXSYS.COMPANY_SEARCH_MULTI', 'MULTI_COLUMN_DATASTORE');
         CTX_DDL.SET_ATTRIBUTE(     'CTXSYS.COMPANY_SEARCH_MULTI',
                        'columns',
                        'COMPANY,
                        DESC_N_PRODS,
                        PROD_DESC_N_PRODS,
                        PG_TITLE_GLUSR,
                        PG_KWD_DESC,
                        GEOGRAPHICAL_PROFILE,
                        GLUSR_DESC,
                        SUBCAT_DESC,
                        CTL_DESC,
                        SHORT_PROFILE,
                        LONG_PROFILE');
         CTX_DDL.DROP_SECTION_GROUP('CTXSYS.COMPANY_SEARCH_GROUP');
         CTX_DDL.CREATE_SECTION_GROUP('CTXSYS.COMPANY_SEARCH_GROUP', 'BASIC_SECTION_GROUP');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F1',     'COMPANY');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F2',     'DESC_N_PRODS');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F3',     'PROD_DESC_N_PRODS');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F4',     'PG_TITLE_GLUSR');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F5',     'PG_KWD_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F6',     'GEOGRAPHICAL_PROFILE');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F7',     'GLUSR_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F8',     'SUBCAT_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F9',     'CTL_DESC');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F10','SHORT_PROFILE');
         CTX_DDL.ADD_FIELD_SECTION('CTXSYS.COMPANY_SEARCH_GROUP' , 'F11','LONG_PROFILE');
         CTX_DDL.DROP_PREFERENCE('CTXSYS.IIL_LEXER');
         CTX_DDL.CREATE_PREFERENCE('CTXSYS.IIL_LEXER','BASIC_LEXER');
    CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_LEXER', 'INDEX_STEMS', 'ENGLISH');
         CTX_DDL.DROP_PREFERENCE('CTXSYS.IIL_FUZZY_PREF');
         CTX_DDL.CREATE_PREFERENCE('CTXSYS.IIL_FUZZY_PREF', 'BASIC_WORDLIST');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','FUZZY_MATCH','ENGLISH');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','FUZZY_SCORE','60');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','FUZZY_NUMRESULTS','100');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','SUBSTRING_INDEX','TRUE');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','PREFIX_INDEX','TRUE');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','PREFIX_MIN_LENGTH','1');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','PREFIX_MAX_LENGTH','3');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','WILDCARD_MAXTERMS','15000');
         CTX_DDL.SET_ATTRIBUTE('CTXSYS.IIL_FUZZY_PREF','STEMMER','ENGLISH');
    END;
    CREATE INDEX COMPANY_SEARCH_IM on COMPANY_SEARCH(DUMMY) INDEXTYPE IS
    CTXSYS.CONTEXT PARAMETERS
    ('DATASTORE CTXSYS.COMPANY_SEARCH_MULTI SECTION GROUP CTXSYS.COMPANY_SEARCH_GROUP MEMORY 50M
    LEXER CTXSYS.IIL_LEXER WORDLIST CTXSYS.IIL_FUZZY_PREF STOPLIST CTXSYS.IIL_STOPLIST');
    Now if I want to search for a string - acrylic crochet
    My progressive clause is as follows:
    <QUERY>
    <TEXTQUERY>
    <PROGRESSION>
    <SEQ>(acrylic crochet) within F2</SEQ>
    <SEQ>($acrylic $crochet) within F2</SEQ>
    <SEQ>(acrylic crochet) within F3</SEQ>
    <SEQ>($acrylic $crochet) within F3</SEQ>
    <SEQ>(NEAR((acrylic,crochet))) within F2</SEQ>
    </PROGRESSION>
    </TEXTQUERY>
    </QUERY>
    The data set has a record where F2 Contains following text:
    Manufacturers and exporters of yarns like acrylic yarn, viscose yarns, acrylic blended yarn, acrylic knitting yarn, spun yarn, blended yarns, braided thread, chenille yarn, cotton yarn, crochet yarn, dupion silk yarns etc
    My problem is that - This record is not coming in the search result.
    The record starts appearing if I use only NEAR Clause. as shown below:
    <QUERY>
    <TEXTQUERY>
    <PROGRESSION>
    <SEQ>(NEAR((acrylic,crochet))) within F2</SEQ>
    </PROGRESSION>
    </TEXTQUERY>
    </QUERY>
    Please advise what could be wrong - is my Index proper, or my progressive clause has some problem or there is something else which I have totally missed.
    Regards
    Madhup

    The discussion in the link below contains the same bug that you have encoutered and some workarounds.
    Re: progressive relaxation doesn't progress

  • Debugging mode - sql query not showing up in console

    Hi,
    I have turned on the debugging mode via Admin->Server Configuration->Debug Level. Set it to debug mode.
    I restarted the server. I wanted to test if the query will show up if there was an error in the query.
    However I am not seeing any query. It complains that there is some error, but doesn't show what query string it is using.
    Anyone got any idea how I can get query to show up on console (BI Publisher web interface) as opposed to
    going and seeing the log files on the server.
    Please let me know.
    Thanks
    Girija

    Thankyou Vetsrini.
    I will try out custom log table approach.
    I see that there is a way to test pl/sql scripts via the DBMS output
    and for that we need some invoking program like SQL PLUS to get the
    log out into a file.
    However, we wanted to see if there is a way to set Pl/SQL log files
    and get PL/SQL logs when the calling program is BI Publisher.
    regards
    Girija

  • To_date function not fetching the desired result.....

    Hi Gurus,
    I get varied results from the below 2 queries, I am pessimistic about using to_char instead prefer using to_date, but query doesn't seem to fetch the complete data while using the to_date but with to_char it works. Please can someone make this to_date used query below work for me.
    Main table structure:
    Column Name     ID     Pk     Null?     Data Type     Default     Histogram     Encryption Alg     Salt
    MINISTRY_CODE     1          Y     VARCHAR2 (15 Byte)          Yes          
    BILL_MONTH     2          Y     DATE          Yes          
    CUBIC     3          Y     NUMBER          Yes          
    GALLONS     4          Y     NUMBER          Yes          
    AMOUNTS     5          Y     NUMBER          Yes          
    MTR_TYPE     6          Y     CHAR (1 Byte)          Yes          1st query:
    SELECT ministry_code,
    DECODE(mtr_type, 'C','Billed Cubic',
    'G','Billed Gallons',
    'A','Billed OMR',
    'R','Collected',
    'U','Total Unpaid Bills') mtr_type,
    SUM(CASE
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '012011' AND mtr_type = 'C' THEN cubic
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '012011' AND mtr_type = 'G' THEN (gallons)
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '012011' AND mtr_type = 'A' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') = '022011' AND mtr_type = 'R' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month,'MMYYYY') <= '022011' AND mtr_type = 'U' THEN amounts ELSE 0 END) January
    FROM tmp_paew_month_gafu1 WHERE ministry_code IN
    (SELECT DISTINCT ministry_code FROM tmp_paew_month_gafu GROUP BY ministry_code)
    GROUP BY ministry_code,mtr_type
    ORDER BY 1,3 DESCSAMPLE OUTPUT:
    MINISTRY_CODE MTR_TYPE JANUARY
    001 Billed Gallons 5326252
    001 Billed Cubic 24210.2363636364
    001 Total Unpaid Bills 16402.5
    001 Billed OMR 13287.36
    001 Collected 10410.508
    002 Total Unpaid Bills 12089.99
    002 Billed Cubic 0
    002 Billed OMR 0
    002 Billed Gallons 0
    002 Collected 0
    003 Total Unpaid Bills 27418.711
    2nd query:
    SELECT ministry_code,
    DECODE(mtr_type, 'C','Billed Cubic',
    'G','Billed Gallons',
    'A','Billed OMR',
    'R','Collected',
    'U','Total Unpaid Bills') mtr_type,
    SUM(CASE
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_char(bill_month) = to_date('012011','MMYYYY') AND mtr_type = 'C' THEN cubic
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) = to_date('012011','MMYYYY') AND mtr_type = 'G' THEN (gallons)
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) = to_date('012011','MMYYYY') AND mtr_type = 'A' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) = to_date('022011','MMYYYY') AND mtr_type = 'R' THEN amounts
    WHEN mtr_type NOT IN ('C','G','A','R','U') THEN 0 WHEN to_date(bill_month) <= to_date('022011','MMYYYY') AND mtr_type = 'U' THEN amounts ELSE 0 END) January
    FROM tmp_paew_month_gafu1 WHERE ministry_code IN
    (SELECT DISTINCT ministry_code FROM tmp_paew_month_gafu GROUP BY ministry_code)
    GROUP BY ministry_code,mtr_type
    ORDER BY 1,3 DESCSample OUTPUT:
    MINISTRY_CODE MTR_TYPE JANUARY
    001 Total Unpaid Bills 106062.002
    001 Billed OMR 0
    001 Billed Cubic 0
    001 Billed Gallons 0
    001 Collected 0
    002 Total Unpaid Bills 42023.243
    002 Collected 0
    002 Billed Gallons 0
    002 Billed Cubic 0
    002 Billed OMR 0
    003 Total Unpaid Bills 133260.435

    What is the sense of to_date(bill_month) in the second query?
    bill_month is already a date. to_date function will expect a character parameter and convert it in a date value.
    So what will happen? First the bill_month will be implicitely converted to a character value.
    Second this character value will be converted back to a date. You gave no format string. So both conversions will be made will your setting of nls_date_format.
    I can only guess what you really want. Perhaps you want to trunc the bill_month with trunc(bill_month,'MM').
    Please give us
    - table create script
    - insert statements for test data
    - required output for these test data
    - description of your requirements
    Edited by: hm on 22.11.2012 23:16

  • ADF Query not showing correct search results.

    Hi,
    I am using normal ADF af:query to search data using a VO Criteria.
    We have modified the getter of searched column in VORowImpl java class to return values based on NLSID search from cache.
    Logic in getter:
    If for a column_name nlsid is present then show data as the value of nlsid.
    Suppose Initially:
    column_name = "Column1"
    column_name_nlsid="Column1_nlsid"
    column_name_nlsid_value="Column1_nlsid_value"
    The table will show:
    column_name: "Column1_nlsid_value"
    if we search "Column1" as column_name, The Search will also show:
    column_name: "Column1_nlsid_value"
    in results
    But,
    If we modify the nlsid value as:
    column_name_nlsid_value="Column1_nlsid_value_MODIFIED"
    Then
    The table will show:
    column_name: "Column1_nlsid_value_MODIFIED"
    if we search "MODIFIED" in column_name, The Search will NOT show any results
    So, it seems to me that the af:query search always searches upon the values derived from InternalAttribute values.
    What can i do to over-ride such behaviour , so that the search also takes the data from modified getters.

    Try posting in Jdeveloper Forum JDeveloper and ADF which has more audience

  • Notifications Panel Not Showing the Desired Number of Items

    I have been doing some tweaks to the notification panel on my iPhone 6.  For the Dropbox widget, I changed the Notification setting to display 1 most recent items instead of the 5 most recent items.  However, whenever I swipe down the notification panel, I'm still seeing the 5 most recent items.  I tried removing the widget and re-adding it and it's still showing the 5 most recent items.  How do I "convince" it to do what my settings should be telling it to do?

    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Look there for the iPod Photo Cache.
    Trash it. Start iPhoto and try sync again.
    Regards
    TD

  • Searching for apps not showing the desired apps

    On 6/28/2012 at around 4 PM EST, I searched for the app "Chrome" on my iPhone 4 running iOS 5.1.1. I wasn't shown the Chrome browser in the search results. However, when I search for the same app on iTunes on my mac, I can find that app. I don't want to synch my phone to my comupter just to install this app. Any idea why might this be happening. This isn't the first time, it has happened before too. BTW my account is US iTunes based account.

    But this issue always happens, whenever there is a new app. I have to wait for a day or two or install it by synching the phone to my mac. I just want to throw it out there, so that I know if this happens to others or just me.

  • Name attribute not giving the desired result in form tag

    Hi,
    I am using struts and the name attribute in form tag is not giving me the desired reuslt. The code is
    <html:form name="loginActionForm" type="source.form.LoginActionForm" action="/login.do" method="post">
    </html:form>
    when I am trying to use the name in javascript then I am getting an error
    "document.loginActionForm " is null or not an object.Where am I going wrong?

    I did so but the name I have used in the form tag is the same as what i have used in javascript.I dont think that it is a javascript error and it must be some mistake I made in the form tag.Also one more thing is it necessary to use the type attribute if you use the name attribute.

  • Query not giving the correct result

    select Project_id, contractno
    from elf_transactions
    where(rtrim(contractno),rtrim(project_id)) not in
    (select rtrim(contractno),rtrim(projectid)
    from contract_proj
    where report_month='1-May-2007' )
    when I m firing this query, it is not giving correct result to me, it also select the recorts which are matches in both the table
    i want to fine out those contract, with projectid which are not in contract_proj table
    Please help me in this regard

    CREATE TABLE ELF_TRANSACTIONS
    VENDOR_ORDER_REF VARCHAR2(60 BYTE),
    BT_SUB_CON_REF VARCHAR2(10 BYTE),
    PR_NO VARCHAR2(15 BYTE),
    PO_NO VARCHAR2(15 BYTE),
    PR_PO_DESCR VARCHAR2(200 BYTE),
    ONE_IT_PROG VARCHAR2(50 BYTE),
    BT_DEL_MANAGER_NAME VARCHAR2(40 BYTE),
    DELIVERY_TYPE VARCHAR2(5 BYTE),
    ACTUAL_DEP_DATE DATE,
    ASSOC_ASG_BR_QUE VARCHAR2(50 BYTE),
    PRE_AVG_P1_P2_INC_CNT NUMBER(3),
    POST_P1_P2_INC NUMBER(3),
    PERC_GROWTH_POST_REL NUMBER(3),
    VENDOR_DEL_MANAGER VARCHAR2(50 BYTE),
    REPORT_MONTH DATE,
    COMMENTS VARCHAR2(200 BYTE),
    PROJECT_ID VARCHAR2(20 BYTE),
    CONTRACTNO VARCHAR2(15 BYTE),
    CONTRACT_TYPE NVARCHAR2(15),
    IDUNO VARCHAR2(10 BYTE),
    STATUS VARCHAR2(10 BYTE),
    DESCRIPTIONCODEDELIVERABLE VARCHAR2(255 BYTE),
    UNIQUEID VARCHAR2(255 BYTE),
    LOCK_RECORD CHAR(1 BYTE),
    VERIFIED CHAR(1 BYTE),
    VERIFIED_BY VARCHAR2(40 BYTE),
    BT_VERIFIED CHAR(1 BYTE),
    BT_VERIFIED_BY VARCHAR2(40 BYTE)
    CREATE TABLE CONTRACT_PROJ
    CONTRACTNO VARCHAR2(10 BYTE),
    PROJECTID VARCHAR2(20 BYTE),
    IDUNO VARCHAR2(10 BYTE),
    CH_EMPID VARCHAR2(8 BYTE),
    CHNAME VARCHAR2(40 BYTE),
    GH_EMPID VARCHAR2(8 BYTE),
    GHNAME VARCHAR2(40 BYTE),
    PM_EMPID VARCHAR2(8 BYTE),
    PMNAME VARCHAR2(40 BYTE),
    SPM_EMPID VARCHAR2(8 BYTE),
    SPMNAME VARCHAR2(40 BYTE),
    PRJ_MONTH DATE,
    BT_CONTRACT CHAR(1 BYTE)
    REPORT_MONTH     COMMENTS     PROJECT_ID     CONTRACTNO     CONTRACT_TYPE     IDUNO     STATUS     DESCRIPTIONCODEDELIVERABLE     UNIQUEID
    06/01/2007 00:00:00          1287     TML007452               OPEN     Delivery of CRs DM CD and NSI     N/A
    06/01/2007 00:00:00          1280     TML007452               OPEN     Delivery of CRs H&W OOR and WLTO     N/A
    06/01/2007 00:00:00          1231     TML007452               OPEN     Delivery of CRs H&W OOR WLTO     
    06/01/2007 00:00:00          1097     TML007679               OPEN     High Level Roadmap for Global Services and Wholesale with Feasibility study into BTR access to Switc     N/A
    06/01/2007 00:00:00          405     TML007942               OPEN     RTRCC DEVELOPMENT -Q107     
    06/01/2007 00:00:00          405     TML007919               OPEN     WLR3 DEVELOPMENT-Q107     
    06/01/2007 00:00:00          1170     TML008439               OPEN     R-510     
    CONTRACTNO     PROJECTID     IDUNO     CH_EMPID     CHNAME     GH_EMPID     GHNAME     PM_EMPID     PMNAME     SPM_EMPID     SPMNAME     PRJ_MONTH     BT_CONTRACT
    MBT003060     176     BT06     8694     Soman Sameer Surendra     1054     Bhadti Shripad Shivram     1054     Bhadti Shripad Shivram     1420     Rao Darbhamulla Kameswara     05/01/2007 00:00:00     N
    MBT003842     1156     BT12     19992     Kalle Ajit Ashutosh     1539     Padgaonkar Shailesh Vishwanath     13948     Khunte Milind Vasant     16426     Kulkarni Vinay     05/01/2007 00:00:00     Y
    MBT004677     458     BT09     20275     Mundassery George     5044     Kamalapurkar Leena Shrinivas     12849     Dave Ajay Yogeshchandra     2017     KIRKIRE SONAL MADHUKAR     05/01/2007 00:00:00     N
    MBT004695     362     BT13     20276     Ghosh Sankar     2624     Avachat Jagdish Vasantrao     13592     Pal Sudipta     2624     Avachat Jagdish Vasantrao     05/01/2007 00:00:00     N
    MBT004826     VITRIA     BT09     20275     Mundassery George     26099     Saha Debendra Kumar     28134     Hinge Anand Sharad     12777     Karandikar Sumedh Vidyadhar     05/01/2007 00:00:00     Y
    MBT004924     1027     BT03     1451     Tillu Ashirwad     15693     Devaraj Daniel G     6867     Jadhav Satyajit Ramesh     15693     Devaraj Daniel G     05/01/2007 00:00:00     N
    MBT004927     1025     BT05     4436     Kelkar Subhash Manohar     20379     Gore Sujeet Narayan     13704     Vignesh Chandrasekaran     4347     BIJNORI REHANA GULAMWARIS     05/01/2007 00:00:00     N
    MBT004927     1092     BT05     4436     Kelkar Subhash Manohar     15094     Jain Jitendra     13350     Bokil Shripad Raghunath     9511     Markande Balchandra Narayan     05/01/2007 00:00:00     N
    MBT004927     1213     BT09     20275     Mundassery George     19996     Vege Sridhar     16401     Sibgathulla Mohammed     19996     Vege Sridhar     05/01/2007 00:00:00     N

  • MDX Formula - Not Getting the Desired Results

    Hi All,
    I have the following formula that I am using to calculate the "Average Daily Volume MTD" but if I drilldown into the Products dimension then I don't see any values. It seems like it's only calculating the values at the top level (GEN1).
    CASE
    WHEN
    IsLevel ([Time Periods].CurrentMember, 0)
    THEN
    Sum(CrossJoin({[Trade Quantity]},{FirstChild(Parent([Time Periods].CurrentMember)):([Time Periods].CurrentMember)}))
    Sum(CrossJoin({[Trade Days Input]},{FirstChild(Parent([Time Periods].CurrentMember)):([Time Periods].CurrentMember)}))
    WHEN
    (IsLevel ([Time Periods].CurrentMember, 1))
    THEN
    [Trade Quantity] / ([Measures].[Trade Days Input])
    ELSE
    Missing
    END
    I tried to insert the another condition in the WHEN clause,
    AND IsAncestor([Products], [Products].Dimension.CurrentMember, INCLUDEMEMBER)
    but it still doesn't give me any values.
    Can anyone please help me out here?
    Thanks

    Hi Dighe,
    Thanks , I have tried that , but its not working.
    What is happening that , with every setting system is unable to filter batch .
    For each material it selects all the batches in query2 .
    If I try to jump from batch1 still it displays all the batches.
    If I use only the Batch in the assignment it dispalys all the rows of the query  so its evident that there is no filter applied at the batch level , I tried all the combination , single value , P , E , Infoobject etc. But it remains same.
    Any guess???
    Thanks.

  • Region source (PL/SQL function body returning SQL query)

    Hi, guys.
    Here is what i try to do:
    Create a region of type SQL Query (PL/SQL function body returning SQL query). In the source area i tried to put this:
    DECLARE
    v_new VARCHAR2(10);
    v_SQL varchar2(32000);
    BEGIN
    v_new := :P102_HDN_NEW;
    -- htp.p(v_new);
    IF v_new = 'N-Set' THEN
    v_SQL := 'select ' ||
    ELSIF v_new = 'Y-Set' THEN
    v_SQL := 'select ' ||
    END IF;
    RETURN v_SQL;
    END;
    And here is the reply from APEX:
    1 error has occurred
    Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. The query can not be parsed, the cursor is not yet open or a function returning a SQL query returned without a value.
    Now.
    1. Variable is set with the right value.
    2. Each statement (separately) returns SQL that works with no problems
    3. Problem occures if i try to put IF statement around the SQL creation.
    4. If i select "Use Generic Column Names (parse query at runtime only)" instead of "Use Query-Specific Column Names and Validate Query" then the script returns SQL properly, however report's column names are set to Col1, Col2,Col3 ......
    Thnks in advence
    Mike

    OK. Here is enire statement:
    DECLARE
    v_new VARCHAR2(10);
    v_SQL varchar2(32000);
    BEGIN
    v_new := :P102_HDN_NEW;
    htp.p(v_new);
    IF v_new = 'N-Set' THEN
    v_SQL := 'select ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(10,c.sdescr) descr, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(12,DECODE(ld.level,''All'', ''All Categories'',ld.level)) level, ' ||
    'apex_item.checkbox(1, ld.opt_in_auto_flag, decode(ld.opt_in_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_in, ' ||
    'apex_item.checkbox(2, ld.opt_in_manual_flag, decode(ld.opt_in_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_in, ' ||
    'apex_item.checkbox(3, ld.opt_out_auto_flag, decode(ld.opt_out_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_out, ' ||
    'apex_item.checkbox(4, ld.opt_out_manual_flag, decode(ld.opt_out_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_out, ' ||
    'DECODE(c.code, ''NMBR'', NULL,''Change to '' || DECODE(ld.level,''All'',''Categories'',''All Categories'')) link_change, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(11,c.code) code ' ||
    'from ' ||
    'tbl1 c, ' ||
    'tbl2 ld ' ||
    'where c.code = ld.code ' ||
    'and c.type = ''TYPE1'' ' ||
    'and c.active = ''Y'' ' ||
    'order by c.sorting ';
    ELSIF v_new = 'Y-Set' THEN
    v_SQL := 'select ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(10,c.sdescr) descr, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(12,''All Categories'') level, ' ||
    'apex_item.checkbox(1, c.option_1, decode(c.option_1,NULL,''disabled'',''Y'',''checked'')) auto_in, ' ||
    'apex_item.checkbox(2, c.option_3, decode(c.option_3,NULL,''disabled'',''Y'',''checked'')) manual_in, ' ||
    'apex_item.checkbox(3, c.option_2, decode(c.option_2,NULL,''disabled'',''Y'',''checked'')) auto_out, ' ||
    'apex_item.checkbox(4, c.option_4, decode(c.option_4,NULL,''disabled'',''Y'',''checked'')) manual_out, ' ||
    'DECODE(c.code, ''AAA'', NULL,''Options by AAA'') link_change, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(11,c.code) code ' ||
    'from ' ||
    'tbl1 c ' ||
    'where 1 = 1 ' ||
    'and c.type = ''TYPE1'' ' ||
    'and c.active = ''Y'' ' ||
    'order by c.sorting ';
    END IF;
    RETURN v_SQL;
    END;
    If i put just this
    DECLARE
    v_new VARCHAR2(10);
    v_SQL varchar2(32000);
    BEGIN
    v_new := :P102_HDN_NEW;
    htp.p(v_new);
    v_SQL := 'select ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(10,c.sdescr) descr, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(12,DECODE(ld.level,''All'', ''All Categories'',ld.level)) level, ' ||
    'apex_item.checkbox(1, ld.opt_in_auto_flag, decode(ld.opt_in_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_in, ' ||
    'apex_item.checkbox(2, ld.opt_in_manual_flag, decode(ld.opt_in_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_in, ' ||
    'apex_item.checkbox(3, ld.opt_out_auto_flag, decode(ld.opt_out_auto_flag,NULL,''disabled'',''Y'',''checked'')) auto_out, ' ||
    'apex_item.checkbox(4, ld.opt_out_manual_flag, decode(ld.opt_out_manual_flag,NULL,''disabled'',''Y'',''checked'')) manual_out, ' ||
    'DECODE(c.code, ''NMBR'', NULL,''Change to '' || DECODE(ld.level,''All'',''Categories'',''All Categories'')) link_change, ' ||
    'APEX_ITEM.DISPLAY_AND_SAVE(11,c.code) code ' ||
    'from ' ||
    'tbl1 c, ' ||
    'tbl2 ld ' ||
    'where c.code = ld.code ' ||
    'and c.type = ''TYPE1'' ' ||
    'and c.active = ''Y'' ' ||
    'order by c.sorting ';
    RETURN v_SQL;
    END;
    it works fune...

Maybe you are looking for

  • Ipod no longer updating on version 9.02 of itunes

    My ipod has always updated synched automatically with itunes until today after I was updated to 9.02 itunes. Now when I plug it in, I see the "synch in process" message on my ipod as usual, but it only stays on for a second then disappears and nothin

  • Problem in transporting details of wage elements of pe51 to quality server.

    Hi Experts. Here i have added some new wage elements in the windows of pe51 in Development sever. They have added properly in the Development server. But when im trying to transport the same to quality server,no details are going to the quality serve

  • How to create this Hieararchical Tree?

    Hi All, Please help me on this issue. I need DRILL DOWN functionality in forms. Im trying to Study / Create Hierarchi Tree Concept in Forms 6i, but couldn't able to manage /Understand how to create this. Please any one could help me. and im giving my

  • Switching between 10.3.9 and 10.5.3

    My emac has System 10.5.3 on it and I have a firewire disk with 10.3.9 on. Is there any way I can switch between the two systems without restarting and changing disks for startup? Thanks, Margit in Minnesota

  • ATV slideshow music is distorted

    I can play music from the ATV through the connected receiver and it sounds fine. If I play a photo slideshow with the same playlist in the background, it comes through distorted. The receiver is showing the input as maxing out. Is there a setting som