Query not showing out put

i am writing SQL lines they are part of my stored procedure there is not any error in this but this not
showing me any result but giving me message anonymous block completed
set serveroutput  on
declare
var varchar(50);
re varchar(50);
begin
var:='zoheb123456789';
re :=length(var);
if re!='' then
dbms_output.put_line(var);
dbms_output.put_line(re);
else
dbms_output.put_line('no');
end if;
end;please help me
Edited by: BluShadow on 14-Feb-2011 08:53
to show code tags and convert <> to != for the forums

sql> declare
  2    var varchar(50);
  3    re  varchar(50);
  4  begin
  5    var:='zoheb123456789';
  6    re :=length(var);
  7    if re != ''
  8    then
  9      dbms_output.put_line(var);
10      dbms_output.put_line(re);
11    else
12      dbms_output.put_line('no');
13    end if;
14* end;
15  /
no
PL/SQL procedure successfully completed.As you can see, it works in sql*plus.
The result, "no" may not be what you expect. The reason for this is the handling of the empty string, in
if re != ''Oracle translates '' to null:
if re != nullThis will always evaluatie to false (null checking should be of course be done with IS [NOT] NULL).
BTW: why is re varchar2 anyway? It is assigned a numeric value, so changing it into numeric would be better. And you would avoid the faulty null checking.

Similar Messages

  • Why the content of the Explain Plan not show out?

    Why the content of the Explain Plan not show out?
    I am using Oracle 11g.
    I already ran the utlxplan.sql sctipt and I also set serveroutput on.
    SQL> set autotrace on
    SQL> EXPLAIN PLAN FOR SELECT*FROM DEMO_TABLE WHERE OWNER='HR';
    Explained.
    Elapsed: 00:00:00.67

    When you say:
    My release 10.2 database display the Explain Plan automatically.
    How to make 11.1.0.6 Oracle database to display the Explain Plan automatically.What do you mean? Specifically, what commands are you executing in the 10.2 database, that displays the execution plan "automatically"?
    Are you saying that if you execute the same command in 11.1.0.6, you don't get a similar result? What happens? Do you get an error?
    For both the 10.2 case and the 11.1.0.6 case, post the full output of the commands you're executing, and the result you are seeing.
    Then, maybe someone can help you.
    When you post the output, please encapsulate it in a pair "code" tags, which is the word "code" without the quotes, surrounded by a pair of curly braces {}.
    When you do this correctly, the output looks like:
    This is output from my execution plan run.and is much easier to read.
    Don't be afraid to use the preview tab to see if your message will be posted with the correct formatting.
    -Mark

  • Please see this query, not showing data Why?

    I created a report and write following query,it was working well since last 4 months but today automaticly not showing data I can undertstand why?
    Becuase I didnt make any changes in this query.
    Please help me
    Urgent
    SELECT ALL MERCH_ORDER.ORDERNO, MERCH_ORDER.ORDERDATE, MERCH_ORDER.SHIP_DATE, MERCH_ORDER.PONO,
    MERCH_ORDER.SUBPP, MERCH_ORDER.PJNO, BUYER.B_NAME, BUYER.B_AJENT,
    MERCH_ORDER.ITEM, MERCH_ORDER.FABRIC, MERCH_ORDER.QUALITY, MERCH_ORDER.COMPOSITION,
    MERCH_ORDER.P_SIZE, MERCH_ORDER.QUANTITY, MERCH_ORDER.Q_UNIT,
    MERCH_ORDER.NETWHT, MERCH_ORDER.WT_UNIT, MERCH_ORDER.TERM, MERCH_ORDER.COMM,
    MERCH_ORDER.PRICE, MERCH_ORDER.CUR_SYMB, MERCH_ORDER.STATUS, MERCH_ORDER.REMARKS,
    MERCH_ORDER.WONO, MERCH_ORDER.PRONO, MERCH_ORDER.PES_QUANTITY,
    MERCH_ORDER.PES_Q_UNIT, MERCH_ORDER.PES_PRICE, MERCH_ORDER.PES_CUR_SYMB
    FROM BUYER, MERCH_ORDER
    WHERE MERCH_ORDER.CANCEL IS NULL
    AND (MERCH_ORDER.B_CODE = BUYER.B_CODE)
    and merch_order.orderno not in
    (select export_order1.orderno from export_order1)
    ORDER BY MERCH_ORDER.ORDERNO

    Where "first table" is merch_order and "second table" is export_order1?
    How many distinct orders are in each table?
    Are there any NULL order numbers in either table?
    I'd put money on the fact that if commenting out a clause causes a number of rows to be returned, that clause is filtering out all the rows. You'll need to go through your data to figure out why the NOT IN clause is filtering out all your rows.
    Justin

  • Pictures not showing when putting together a photobook - bar or book

    I am trying to make a photobook but half the pictures in my album are not showing in the photo bar. If I drag and drop them and then click on each photo book page they appear there - but when I zoom out they also seem to be missing in the book. It's really frustrating when putting together becuase I can't see what I'm trying to place and I'm not sure the book will print properly either. Can anyone help?

    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Include the option to rebuild the thumbnails. It can take 3 or 4 goes for this to work

  • 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

  • Query not showing field discription in another language login

    Hi Experts,
    when i am running query as default language, query output is perfect.
    But when i am changeing language and DE (Danish) at SAP BW login then
    1) query is not showing field description at Selection Screen rather only displaying technical name
    2) at query output there is no report title and column heading
    Please suggest how to set language property for entire query
    i guess system not able to convert language from EN to DE.
    what and where setting need to change
    Thanks in advance

    This why at the beginning of a project you say this is English and all user shave to log in via English or if not then you build into your quote a huge amount for translation
    Have a look at the help files about the translation workbench in BW - it's big and it's a expensive and time consuming thing to do
    The two descriptions are stored in the query element text tables and for info objects in their specific tables- yep I suppose you could hack them - but you may end up causing more problems than it's worth
    If it's a simple case of some queries need translating in a small number of languages then it's as simple as splitting yoru screne into two and loggin in twice one in english the other in the other language - first in RSA1 to change the infoobject and then in query designer (following the key strokes you use in ENglish if you language skills aren;t that good int he other languages)
    The other alternative as mentioned above is using the trsnaltion workbench - but the cleitn will have get the cheque book out as it can be quite a costly exercise

  • 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

  • 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

  • Query not showing data

    Hi,
    I have an infoset which is on top of two ODSs.
    Data for a particular cost center is present in both the ODSs.
    There is no data prsent in RSISET for that CC.
    Also the query is not showing any data for that CC but data is showing data
    for other CC for the same date.
    Please help.
    *points assured*

    Dear Sourav,
    You can Check if there is some other primary Key differences in the Infosets .Have you declared only Costcenter as the Key for both the ODS Objects ?? Check the other links that you have maintained as a part of key in Infoset.
    Hope it helps..
    Thanks,
    Krish

  • Query not showing complete data

    Hi,
    I faced this issue many times. Original query is not showing complete data but when I create a new query with same rows, columns and filters it gives correct data. Do anybody have any idea what can be the problem?

    Below is the checklist :
    1. Make sure you have same number of filters/ restrictions in both the queries.
    2. Make sure you are not using any authorisation object.
    3. Make sure the technical names of the objects you are using in the query are name.
    4. Make sure both the queries are on the same multiprovider.
    5. Make sure both are of same version.
    These are very basic things, I assume you must have done. But these are the only possibilities I could think of.
    If this is fine, then as suggested by Raman you can add one object each time in both the queries and test the output. You might get some clue.
    Thanks,

  • Query not showing detailed result when run through query Designer or Portal

    Hi,
    There is one query which not showing detailed result while running through Query Designer or run in Portal.
    But strange thing is that it is showing the detailed result when i run it through BeX Analyzer.
    While all the other queries don't have this problem in system. All showing the correct detailed result.
    If anyone have some idea on this issue plz let me know.
    Regards,
    Javed
    Edited by: Javed Akhtar on Jul 7, 2009 3:59 PM

    Hi,
    We can do this setting in WAD. Please check the web template and try to remove that setting. When you have hierarchy then we can display only till certain level in portal, this setting is done in web template APIs, but in bex analyzer you can see all the detailed information.
    Edited
    Go through this thread for some more detailed information
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/7b5f0a95ce12d0e10000000a422035/frameset.htm
    Regards,
    rik

  • OSTC Query Not Showing Correct Percent If Component is Changed

    Hello gurus and experts...here is an interesting question:
    Question:  Why does a query not report proper Sales Tax Code percentage from OSTC table when a component is updated?
    Sales Tax Code (STC) of CA-37B, with a rate of 10.25% is made up of three parts:
    California (CA) State Tax Jurisdiction of "CA" with a rate of 7.00%,
    County Tax Jurisdiction of "CA-37" at a rate of 1.75%,
    City Tax Jurisdiction of "CA-37B" with a rate of 1.50%, and the effective date is set at 31 Dec 2008 (in the past).
    When the City Tax Jurisdiction is changed to 1.00% and date of 31 Dec 2009, the OSTC of CA-37B should be 9.75%.
    However, when a query is run on the OSTC table it strangely reports the old 10.25% (on the Sales Tax Code window it shows correctly as 9.75%).
    Here is the query - very simple...as about as simple as it gets...
    SELECT
    T0.Code,
    T0.Name,
    T0.Rate AS 'Total Tax Percentage',
    T0.Freight AS 'Freight Taxable?'
    FROM OSTC T0
    ORDER BY T0.Code
    IF we go back to the Sales Tax Code Window and change anything (description, one of the components, etc) and hit the update button, then the query reports the correct percentage.
    Am I missing something here?  I would imagine that the system must be doing something and I cannot believe the workaround is just go back and update something in the Sales Tax Code window - there are a ton of updates to do with taxes each year!  Trying to remember which component was updated can cause real confusion.  SAP B1 does a ton of automatic updates all over the system - why would it just be this area of information in OSTC???
    Thanks for reading the post, and many more thanks for your help and suggestions - Zal

    OK - Question Answered - had nothing to do with the query - user did not hit "Update" two times when doing the City Tax Jurisdiction Update...
    I knew SAP would be doing an auto update - has to!!!
    Thanks all - Zal

  • Unoin all Query not showing result

    I write the query with sub query
    query 1 has no any record
    query 2 has one record
    I do query 2 - query 1 (qty)
    display nothing??
    select null doc_type,
            null docno,
            null docdate,
            qry1.itemcode,
            qry1.itemname,
            null party,
            null itemunit,
      nvl(qry2.Inqty,0) - nvl(qry1.outqty,0) qty
          from (                                           --------- Query 1 for Check Out Quantity ----
                                                select itemcode,itemname,sum(qty) OUTQTY from smd
                                           where (doc_type ='SAO'or doc_type = 'D.C')
                                            and (docdate < :dd1)
                                            group by itemcode,itemname) qry1,
                                                        ------------Query 2 for check In Quantity ----
                                              (select itemcode,itemname,sum(qty) inqty from
                                            (select itemcode, itemname,qty from smd where doc_type ='OPN'
                                            union all
                                            select b.itemcode, b.itemname,sum(nvl(b.qty,0)) qty from smd b
                                            where (doc_type ='SAI' or doc_type = 'MRN')
                                            and (docdate <= :dd1)
                                            group by b.itemcode, b.itemname)
                                            group by itemcode,itemname                              
                                            ) qry2                                         
                                            ----------- to check the conditions ---------                                                                      
                                            where qry1.itemcode = qry2.itemcode (+)
                                            and qry2.itemcode between :itm1 and :itm2     
    Results of both sub query
    Qry1 =itemcode = null, itemname = null, outqty = null ( has no any record)
    qry2 = Itemcode = 0010002 , itemname = Computer , inqty =100why nvl(qry2.Inqty,0) - nvl(qry1.outqty,0) qty not working
    What is wrong in this query

    Thank you experts
    I try but showing error
    select null doc_type,
            null docno,
            null docdate,
            qry1.itemcode,
            qry1.itemname,
            null party,
            null itemunit,
      nvl(qry2.Inqty,0) - nvl(qry1.outqty,0) qty
      from (                                           --------- Query 1 for Check Out Quantity ----
                                                select itemcode,itemname,sum(qty) OUTQTY from smd
                                           where (doc_type ='SAO'or doc_type = 'D.C')
                                            and (docdate < :dd1)
                                            group by itemcode,itemname) qry1
                                               full outer join
                                                        ------------Query 2 for check In Quantity ----
                                              (select itemcode,itemname,sum(qty) inqty from
                                            (select itemcode, itemname,qty from smd where doc_type ='OPN'
                                            union all
                                            select b.itemcode, b.itemname,sum(nvl(b.qty,0)) qty from smd b
                                            where (doc_type ='SAI' or doc_type = 'MRN')
                                            and (docdate <= :dd1)
                                            group by b.itemcode, b.itemname)
                                            group by itemcode,itemname                              
                                            ) qry2                                         
                                            ----------- to check the conditions ---------                                                                      
                                            on (qry1.itemcode = qry2.itemcode)
                                            and qry2.itemcode between :itm1 and :itm2          
    ORA - 00600

  • 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
    "

  • Log application query not showing correct results

    Hi,
    We are running Dataguard (DG) in our production environment. EBS 11.5.10.2 and DB 10.2.0.4.
    Every morning we run the following query on both primary and standby to confirm that the logs are being transported and applied to the standby:
    select sequence#,applied,to_char(first_time,'mm/dd/yy hh24:mi:ss') first from v$archived_log order by first_time;
    Once the logs are transported and applied, a response of 'Yes' is returned for each log generated. We have noticed within the last week that when we run the query on primary, 'No' is being returned, but on standby, 'Yes' is returned. I have confirmed that standby is reflecting the correct results. I've tried restarting the DG service (alter database recover managed standby....) in an attempt to have primary 'refresh' itself but that didn't work.
    Does anyone have any idea why primary keeps returning 'No' to the query, and how we can get it to reflect to correct results?
    Thanks,
    Lia.

    Hi Werner,
    Thanks for your response. Given what you're saying I find that a little strange since prior to this, the query would return a value of 'YES' on the primary. Actually, to be exact, on the primary, each log would should up twice. One would show 'NO' and the other 'YES'- the second indicating transporting and shipping was successful.
    This is how the results were before:
    SEQUENCE   APP   FIRST
    +154623 NO 04/07/09 08:03:22+
    +154623 YES 04/07/09 08:03:22+
    +154624 NO 04/07/09 08:05:27+
    +154624 YES 04/07/09 08:05:27+
    This is how the results are now:
    SEQUENCE   APP   FIRST
    +154754 NO 04/22/09 07:22:22+
    +154754 NO 04/22/09 07:22:22+
    +154755 NO 04/22/09 07:25:27+
    +154755 NO 04/22/09 07:25:27+
    I'm not doubting that what you're saying is correct, it just adds an element of confusion for me...
    Lia.

Maybe you are looking for

  • Error in saving modified image to Library (ios 4.3)

    Reference thread: https://discussions.apple.com/message/7211117?messageID=7211117 I still have an error in my ios (4.3) code that "cannot type cast @selector expression" when I try to do the following: // Save image UIImageWriteToSavedPhotosAlbum(ima

  • Need to reset/reinstall address book (Contacts)

    The first thing I did was made a backup copy of the address book to look at the format.  I could not read it with a text editor I importing a cvs file that contain over one hundred email addresses, but I didn't notice that the email address was not s

  • BAPI Function Modules

    Hi Experts,            Where can I find the Bapi Function Modules. Can u provide me the coding part of how to use BAPI in our program . Will be rewarded if helpful. Regards.

  • SCCM 2012 R2 and SQL

    I have Two Questions Should SCCM 2012 and SQL be installed on the same server? Should SCCM 2012 be installed on the OS partition or have its own? C: Server 2012 and D:SCCM 2012 What size should my partition be for OS and SCCM either way? I have a ser

  • TS2755 Problem with receiving other's text messages after installing new version.

    I just installed the new version for my iPhone.  Subsequent to this, I started to receive a copy of my husband's text messages.  He did not receive a copy of mine.  We have the same iTunes account, however separate phone accounts.  I turned off and b