How to use xtags: when or xtags: if on variable id

<!-- <xtags:variable id="data" context="<%=specs%>" select="//header/msds"/>
          <a href="/DATA/<%=data%> target="#">MSDS</a>
-->
My problem is if the value of data is null it gives the error page not found in the explorer but I want to href to some html file that for this item data is not there(actually data is holding a pdf file name if no file is attched to this item then i want to display the not data vailable for this item
how I can use xtags: when
xtags:otherwise doing checking on the id data
Thanks

Thanks for response
I got the same code from xtags library but still the problem is
<xtags:choose>
<xtags:when test="firstName">
Hello <xtags:valueOf select="@firstName"/>
</xtags:when>
<xtags:otherwise>
Hello there friend
</xtags:otherwise>
</xtags:choose>
I am not clear that this firstname is the is id or what
I wanted to confirm that I have to use this whole code inside a xtage: variable
like for example my code is
*<xtags:variable id="msds" context="<%=specs%>" select="//header/msds"/>*
I have to validate msds that if it has some value go for it other was I can provide ahtml file displaing no file i sthere

Similar Messages

  • How to use case when function to calculate time ?

    Dear All,
    May i know how to use case when function to calculate the time ?
    for the example , if the First_EP_scan_time is 12.30,  then must minus 30 min.  
    CASE WHEN FIRSTSCAN.EP_SHIFT <> 'R1' AND FIRSTSCAN.EP_SHIFT <> 'R2'
    THEN ROUND(CAST((DATEDIFF(MINUTE,CAST(STUFF(STUFF((CASE WHEN SHIFTCAL.EP_SHIFT = 'N1'
    THEN CONVERT(VARCHAR(8),DATEADD(DAY,+1,LEFT(FIRSTSCAN.EP_SCAN_DATE ,8)),112) + ' ' + REPLACE(CONVERT(VARCHAR(8),DATEADD(HOUR,+0,SHIFTDESC.EP_SHIFT_TIMETO + ':00'),108),':','')
    ELSE LEFT(FIRSTSCAN.EP_SCAN_DATE ,8) + ' ' + REPLACE(CONVERT(VARCHAR(8),DATEADD(HOUR,+0,SHIFTDESC.EP_SHIFT_TIMETO + ':00'),108),':','') END),12,0,':'),15,0,':') AS DATETIME),CAST(STUFF(STUFF(LASTSCAN.EP_SCAN_DATE,12,0,':'),15,0,':') AS DATETIME)) / 60.0 - 0.25) AS FLOAT),2)
    ELSE ROUND(CAST((DATEDIFF(MINUTE,CAST(STUFF(STUFF(FIRSTSCAN.EP_SCAN_DATE,12,0,':'),15,0,':') AS DATETIME),CAST(STUFF(STUFF(LASTSCAN.EP_SCAN_DATE,12,0,':'),15,0,':') AS DATETIME)) / 60.0) AS FLOAT),2) END AS OTWORK_HOUR

    Do not use computations in a declarative language.  This is SQL and not COBOL.
    Use a table of time slots set to one more decimal second of precision than your data. You can now use temporal math to add it to a DATE to TIME(1) get a full DATETIME2(0). Here is the basic skeleton. 
    CREATE TABLE Timeslots
    (slot_start_time TIME(1) NOT NULL PRIMARY KEY,
     slot_end_time TIME(1) NOT NULL,
     CHECK (start_time < end_time));
    INSERT INTO Timeslots  --15 min intervals 
    VALUES ('00:00:00.0', '00:14:59.9'),
    ('00:15:00.0', '00:29:59.9'),
    ('00:30:00.0', '00:44:59.9'),
    ('00:45:00.0', '01:00:59.9'), 
    ('23:45:00.0', '23:59:59.9'); 
    Here is the basic query for rounding down to a time slot. 
    SELECT CAST (@in_timestamp AS DATE), T.start_time
      FROM Timeslots AS T
     WHERE CAST (@in_timestamp AS TIME)
           BETWEEN T.slot_start_time 
               AND T.slot_end_time;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How to use C:when test... inside column in ADF table

    I am using ADF table with below two columns
    in First column i have to check the Type of document if it is doc type then i have to use commondlink to download that file ,Otherwise i need to show only text.
    for that i added
    *<c:when test="{boolean($favoriteType eq 'doc')}">*
    which is not working .
    please let me know how to use <C:when test... inside column in ADF table
    <tr:column sortProperty="favoriteName" sortable="true"
    headerText="#{res['favorite.favoritename']}"
    width="500" noWrap="false">
    <c:choose>
    *<c:when test="{boolean($favoriteType eq 'doc')}">*
    <tr:commandLink actionListener="#{bindings.downloadFile.execute}"
    text="#{row.favoriteName}"
    disabled="#{!bindings.downloadFile.enabled}"/>
    </c:when>
    <c:otherwise>
    <af:outputText value="#{row.favoriteName}"/>
    </c:otherwise>
    </c:choose>
    </tr:column>
    <tr:column sortProperty="favoriteType" sortable="true"
    headerText="#{res['favorite.favoriteType']}" rendered="true">
    <af:outputText value="#{row.favoriteType}" id="favoriteType"/>
    </tr:column>

    Hi Frank,
    Thanks it is working like cham..
    related to same page i am facing new problem which i posted at below thread
    How to get row data runtime @ trinidad table , set rowSelection="multiple"
    can u reply on same.
    Thanks for all help.
    Jaydeep

  • How to use methods when objects stored in a linked list?

    Hi friend:
    I stored a series of objects of certain class inside a linked list. When I get one of them out of the list, I want to use the instance method associated with this object. However, the complier only allow me to treat this object as general object, ( of Object Class), as a result I can't use instance methods which are associated with this object. Can someone tell me how to use the methods associated with the objects which are stored inside a linked list?
    Here is my code:
    import java.util.*;
    public class QueueW
         LinkedList qList;
         public QueueW(Collection s) //Constructor of QuequW Class
              qList = new LinkedList(s); //Declare an object linked list
         public void addWaiting(WaitingList w)
         boolean result = qList.isEmpty(); //true if list contains no elements
              if (result)
              qList.addFirst(w);
              else
              qList.add(w);
         public int printCid()
         Object d = qList.getFirst(); // the complier doesn't allow me to treat d as a object of waitingList class
              int n = d.getCid(); // so I use "Object d"
         return n; // yet object can't use getCid() method, so I got error in "int n = d.getCid()"
         public void removeWaiting(WaitingList w)
         qList.removeFirst();
    class WaitingList
    int cusmNo;
    String cusmName;
    int cid;
    private static int id_count = 0;
         /* constructor */
         public WaitingList(int c, String cN)
         cusmNo = c;
         cusmName = cN;
         cid = ++id_count;
         public int getCid() //this is the method I want to use
         return cid;

    Use casting. In other words, cat the object taken from the collection to the correct type and call your method.
       HashMap map = /* ... */;
       map.put(someKey, myObject);
       ((MyClass)(map.get(someKey)).myMethod();Chuck

  • How to use case when in Select qry?

    Hi Friends,
    I want to use Case when in Select qry, my situation is like this
    SELECT bmatnr blgort bj_3asiz bmat_kdauf b~mat_kdpos
           SUM( ( case when bshkzg = 'S' then bmenge else 0 END ) -
            ( case when bshkzg = 'H' then bmenge else 0 END ) ) AS qty
           INTO corresponding fields of table it_projsal
        FROM mseg AS b
            INNER JOIN mkpf AS a ON bmblnr = amblnr
                                AND bmandt = amandt
        WHERE abudat  < '20061201' AND blgort IN ('1050')
          and b~mandt = '350'
        GROUP BY bmatnr bj_3asiz bmat_kdauf bmat_kdpos b~lgor
    If we give like this it gives an error.
    Please help me, how to use or handle in select qry itself.
    Regards
    Shankar

    this is not a way to select data from the DB tables.
    first get all the data from the DB tables then u have to do SUM Ups .
    Regards
    prabhu

  • How to use case when statements in ODI

    I need to put conditional logic before DVM look up in ODI. In the expression editor I put the following statement:-
    CASE WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='RCS' THEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME=EBIZ_CELL.CELL_DATA
    WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='FDC' THEN CONCAT(POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME,POC_JOURNAL_TEMP_SOURCE_TBL.BOOK_CODE)=EBIZ_CELL.CELL_DATA
    END
    It did not work,
    Under Operators ->All Executions, found the error:-
    905 : 42000 : java.sql.SQLException: ORA-00905: missing keyword
    The description in Session Task contained:-
    select     
         C1_JOURNAL_TEMPL
    from     APPS.POC_JOURNAL_TEMP_SOURCE_TBL POC_JOURNAL_TEMP_SOURCE_TBL, APPS.C$_0POC_JOURNAL_TEMP_TARGET_TB
    where     
         (1=1)
    And (CASE
    WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='RCS'
    THEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME=C2_CELL_DATA
    WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='FDC'
    THEN CONCAT(POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME,POC_JOURNAL_TEMP_SOURCE_TBL.BOOK_CODE)=C2_CELL_DATA
    END)
    Checked the above code in PL/SQL Developer but it gave errors.
    In PL/SQL developer tried to check a simple query using case-when but even that is giving errors in the case-when portion.
    The query is as follows:-
    select phase_code, accounting_period, sum(eff_cc) as BD_Eff_QTD
    from prj_detail
    where
    case POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME
    when 'EXT'
    then
    1
    when 'RAC'
    then
    2
    when 'XXX'
    then
    3
    else
    end
    I would like to know what is wrong with the above code.
    Please let me know what is the correct way of using case-when in PL/SQL as well as in ODI.

    Your ODI case statement and PL/SQL Case statement both looks confusing.
    You are writing case statement under where clause which is not a good practise. If you want to implement logic like-
    select a,b,c from <table>
    where
    when cond^n^ 1 then do 1
    when cond^n^ 2 then do 2
    then better you seperate your query for each filter and do a union, in other words-
    select a,b,c from <table>
    where cond^n^ 1
    union
    select a,b,c from <table>
    where cond^n^ 2
    If you are writing case staement to retrieve a value/column (EBIZ_CELL.CELL_DATA) then no need to include it under filter.
    ODI case for column EBIZ_CELL.CELL_DATA will be:
    CASE
    WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='RCS'
    THEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME
    WHEN POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME='FDC'
    THEN CONCAT(POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME,POC_JOURNAL_TEMP_SOURCE_TBL.BOOK_CODE)
    END
    Pl/SQL query-
    select phase_code, accounting_period,
    case POC_JOURNAL_TEMP_SOURCE_TBL.APPLICATION_NAME
    when 'EXT'then 1
    when 'RAC' then 2
    when 'XXX' then 3
    else 'default value' --- (if no else needed then can also remove else part)
    end,
    sum(eff_cc) as BD_Eff_QTD
    from prj_detail
    Suggested as per what is understood, hope it helps.
    Edited by: 939451 on Jul 5, 2012 12:47 AM
    Edited by: 939451 on Jul 5, 2012 12:48 AM

  • REUSE_ALV_VARIANT_F4' how to use it when we iuse it

    what is the use of function module REUSE_ALV_VARIANT_F4'.
    pls tell the purpodse.
    pls tell how to use this in alv report .pls give some example program .

    Hi..
        Display variant selection dialog box
    <b>Functionality</b>
        Possible entries help, if the variant is defined explicitly as an input
        field on a screen. The selection must be specified by at least partially
        filling the parameter structure IS_VARIANT.
    <b> Variant information</b>
    Description
         This structure is only relevant if display variants are to be saved
         and/or read.
         Variant information including the name of the list output variant.
         The access path must be specified in the fields REPORT (required field),
         HANDLE (optional) and/or LOG_GROUP (optional) to allow ALV to read
         display variants.
         If display variants are also to be saved, the parameter I_SAVE must also
         be entered.
         See also the documentation of the IMPORTING parameter I_SAVE.
         A variant is identified uniquely by:
         o   the program to which it is assigned (REPORT)
         o   the handle if, e.g. several lists with various structures and data
             are called (HANDLE) in a program (I_CALLBACK_PROGRAM)
             The handle is a unique user-assigned CHAR(4) field, which assigns
             the call to the current internal output table structure.
             Example:
             Various lists can be output in program x, depending on a user
             action.
             Display variants are to be able to be defined for each of these
             lists.
    <b>Header Table Name</b>
    Description
        Name of the internal table in the program containing the output data of
        the highest hierarchy level.
    <b>Item Table Name</b>
        Name of the internal table in the program containing the output data of
        the lowest hierarchy level.
    <b>Field catalog</b> containing descriptions of the list output fields (usually
    a subset of the internal output table fields).
    A field catalog is required for every ALV list output.
    The field catalog for the output table is built-up in the caller's
    coding. The build-up can be completely or partially automated by calling
    the REUSE_ALV_FIELDCATALOG_MERGE module

  • How to use skype when away from your country of origin

    Hi All,I am going overseas but don't want to take my mobile. How do I use Skype in the country I am staying to confirm reservations and also to call back home. Am not very technologically minded so hope you can help me.thanksKrys

    Hey Krys great question!
    You can use your laptop or tablet if you are taking them with you.
    You can also use a friend's device (mobile or desktop), go to an internet café, or use an airport or even hotel computer.
    Basically, any device will do!
    The device needs to be connected to the Internet - most hotels, cafes and airports provide free wi-fi nowadays, I always use those.
    Download and install Skype on the device or launch it if it is already installed.
    Login with your existing Skype login and password. (Don't forget to log out when you're done with your calls!)
    You will see all your Skype contacts and past conversations, and you can call them for free, just as you would do it from home.
    If you want to call a mobile or a landline back home or in the country you are travelling to, you can also do that with Skype Credit or a Skype subscription. Calls to landlines and mobiles are not free as we need to connect you to a network operator. However, they are usually much cheaper than what you would pay using your mobile! Check out our rate pages to find the best plan for your needs: https://www.skype.com/en/rates/?nu=subs-calling
    Enjoy!

  • How to use JavaBeans when the number of inputs is variable

    I have a problem. The number of textboxes in a HTML form is read from a database. How can I avoid reentry from users? Is it possible to use JavaBeans or may be there is some other way? Thanks in advance.

    Well, I meant that when a Jsp page is generated the number of textboxes is read from the database. So it it is apriory unknown. But I have found a solution to this problem: create a bean of String type for each textbox. Thanks.

  • Class StorageDataSet - setMetaDataUpdate. How to use? When to use?

    Hi,
    May I know what is the use of Class StorageDataSet.setMetaDataUpdate?
    What implication will it have if I set my dataset to e.g. qryGroup.setMetaDataUpdate(MetaDataUpdate.NONE)? Will it affect the existing functions/results in application?
    Also, when should I use it and when should I not?
    Thanks in advance for all of your help.

    To clarify:
    1. I was not banned from EE but rather I posted the question in the wrong category and asked EE to delete the question so that I can repost the question in the correct category.
    2. I did not post the question all over the internet, only in EE and here.
    3. I am genuinely trying to seek an answer/solution to my question by asking those who might know.

  • How to use index when use analytic functions?

    Oracle 11gR2, I have a an indexed snapshot log table (sequence$$ and PK indexed), and I use a query to access it...
    query looks like:
    SELECT "M_ROW$$", "SNAPTIME$$", "DMLTYPE$$", "OLD_NEW$$", "CHANGE_VECTOR$$", "SEQUENCE$$", "ID", "SITEID", "WEBPAGEID", "WEBFOLDERID"
    FROM mlog$_table1
    WHERE dmltype$$ = 'D'
    AND sequence$$ IN
    (SELECT DISTINCT
    LAST_VALUE (sequence$$)
    OVER (PARTITION BY siteid ORDER BY siteid)
    FROM mlog$_table1);
    how could I access mlog$_table1
    explain plan looks like:
    Plan
    SELECT STATEMENT ALL_ROWSCost: 53 Bytes: 605.864 Cardinality: 1.736                          
         6 HASH JOIN Cost: 53 Bytes: 605.864 Cardinality: 1.736                     
              4 VIEW VIEW SYS.VW_NSO_1 Cost: 28 Bytes: 22.555 Cardinality: 1.735                
                   3 HASH UNIQUE Cost: 28 Bytes: 45.110 Cardinality: 1.735           
                        2 WINDOW SORT Cost: 28 Bytes: 45.110 Cardinality: 1.735      
                             1 TABLE ACCESS FULL TABLE BONGO.MLOG$_PDSI1 Cost: 25 Bytes: 45.110 Cardinality: 1.735
              5 TABLE ACCESS FULL TABLE BONGO.MLOG$_PDSI1 Cost: 25 Bytes: 582.960 Cardinality: 1.735

    ok, I think I feel like a newbie :)
    explain plan for your query is:
    Plan
    SELECT STATEMENT ALL_ROWSCost: 22,1 Bytes: 416,678 Cardinality: 2,654           
         2 SORT GROUP BY Cost: 22,1 Bytes: 416,678 Cardinality: 2,654      
              1 TABLE ACCESS FULL TABLE IBIS.MLOG$_PARTIJA Cost: 22,098 Bytes: 416,678 Cardinality: 2,654
    but it runs for about 3-4 sec..
    1st query:
    create or replace view x as
    select * from mlog$_partija v
    where not (DMLTYPE$$='D' and update_type=2)
    and sequence$$=(select max(sequence$$) from mlog$_partija t
    where t.par_sifpar=v.par_sifpar);
    runs about 17 sec...
    wich is expected since there's a max in subselect...
    but, it's explain plan is:
    Plan
    SELECT STATEMENT ALL_ROWSCost: 108,957 Bytes: 1,84 Cardinality: 1                     
         5 HASH JOIN Cost: 108,957 Bytes: 1,84 Cardinality: 1                
              3 VIEW VIEW SYS.VW_SQ_1 Cost: 22,564 Bytes: 68.634.228 Cardinality: 2.639.778           
                   2 HASH GROUP BY Cost: 22,564 Bytes: 68.634.228 Cardinality: 2.639.778      
                        1 TABLE ACCESS FULL TABLE IBIS.MLOG$_PARTIJA Cost: 22,05 Bytes: 68.634.228 Cardinality: 2.639.778
              4 TABLE ACCESS FULL TABLE IBIS.MLOG$_PARTIJA Cost: 22,145 Bytes: 4.788.557.292 Cardinality: 2.639.778           
    but, I made a third solution wich is something like:
    create table mlog_table1_last as
    select siteid, max(sequence$$) max_seq from mlog$_table1 group by siteid
    I run a query on that temp table:
    select * from mlog$_table1 v
    where not (DMLTYPE$$='D' and update_type=2)
    and sequence$$=(select max_seq from mlog_table1_last t
    where t.siteid=v.siteid);
    it's explain plan is bad:
    Plan
    SELECT STATEMENT ALL_ROWSCost: 2.588.886 Bytes: 1,814 Cardinality: 1           
         3 FILTER      
              1 TABLE ACCESS FULL TABLE IBIS.MLOG$_PARTIJA Cost: 22,148 Bytes: 4.788.557.292 Cardinality: 2.639.778
              2 INDEX RANGE SCAN INDEX IBIS.MLOG_PARIJA_LAST_NDX2 Cost: 1 Bytes: 111,02 Cardinality: 4,27
    but it runs for 1-2 sec..
    why?

  • How do use ADF when scanning with HP 8600

    I am trying to use the automatic document feeder to scan mulitple single sided pages from the "create pdf" menu in adobe acrobat pro.   I've tried mulitple different settings, but  my HP Oficejet Pro 8600 Plus scanner will only scan from the flatbed.  How do I get it to scan from the ADF?

    Hi,
    Please follow instructions (from page #46) of this book:
      http://h10032.www1.hp.com/ctg/Manual/c03026243.pdf
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • HT5140 How to use RTL when writing in Arabic on macbook air?

    I cannot write from right to left on my macbook air? I have Word 2011 installed already.

    r_anderson wrote:
    I've looked for these apps on the app store but they are very expensive.
    I don't think so.  TextEdit and Open/LibreOffice are free.  Mellel light is $15.  Pages 5 is $20.  All much much cheaper than Word, which is really a defective app when it comes to languages.
    Sometimes you can make Word for Mac work with Arabic if you import an arabic document created with Windows Word and then edit that.  But I don't think very many users find this workaround that useful in practice.

  • My apple id password keep saying it hasnt been used before, how i use it when it wont allow me to log in???

    everytime i try to log in my apple id, to buy a new app, it says this apple id has yet to be used with itunes store, please review your account, than when i try it takes me to create a new account, but i cant because i cant use that email.. can some one please help me.. i really want to buy some apps..

    Same issues here. I try and log into face time and cloud, it tells me my email is not veryfied. I go back through the link sent in the verification email and, low and behold, it tells me my address has already been veryfied.
    Getting really annoyed now. I have tried using a different email to log in with, but not even getting the verify email in my inbox, even after it states it has sent one.
    CMON APPLE!!! Please resolve this glitch.

  • How to use index, when query has decode/case

    Hi,
    I have the following query
    i have a index on party_id,party_type_Code in the zx_party_tax_profile table But this index is not used as Iam using a decode on the columns of the zx_party_tax_profile table,
    Is there any way i can rewrite the query so that it uses index
    sELECT /*+ INDEX(ZX_PARTY_TAX_PROFILE_U2) */ party_tax_profile_id FROM (SELECT
    ThirdPartyTaxProfileEO.SUPPLIER_FLAG,
    ThirdPartyTaxProfileEO.CUSTOMER_FLAG,
    ThirdPartyTaxProfileEO.SITE_FLAG,
    ThirdPartyTaxProfileEO.PARTY_TAX_PROFILE_ID,
    ThirdPartyTaxProfileEO.PARTY_ID,
    ThirdPartyTaxProfileEO.REP_REGISTRATION_NUMBER,
    ThirdPartyTaxProfileEO.OBJECT_VERSION_NUMBER,
    ThirdPartyTaxProfileEO.REGISTRATION_TYPE_CODE,
    ThirdPartyTaxProfileEO.COUNTRY_CODE,
    ThirdPartyTaxProfileEO.MERGED_TO_PTP_ID,
    ThirdPartyTaxProfileEO.MERGED_STATUS_CODE,
    ThirdPartyTaxProfileEO.PROGRAM_APP_NAME,
    ThirdPartyTaxProfileEO.PROGRAM_NAME,
    PartyPEO.PARTY_NAME,
    PartyPEO.PARTY_ID AS PARTY_ID1,
    PartyPEO.PARTY_NUMBER,
    decode(ThirdPartyTaxProfileEO.CUSTOMER_FLAG,
    'Y',decode(ThirdPartyTaxProfileEO.SUPPLIER_FLAG,
    'Y', 'SC',
    'C'),
    decode(ThirdPartyTaxProfileEO.SUPPLIER_FLAG,
    'Y', 'S',
    NULL)
    ) AS PARTY_USAGE,
    ThirdPartyTaxProfileEO.REP_REGISTRATION_NUMBER AS TAX_REG_NUMBER,
    LkupPartyUsage.MEANING AS PARTY_USAGE_DESC,
    PartyPEO.PARTY_NAME AS PARTY_FULL_NAME,
    PartyPEO.ADDRESS1||','||
    PartyPEO.ADDRESS2||','||
    PartyPEO.ADDRESS3||','||
    PartyPEO.CITY||','||
    PartyPEO.postal_code||','||
    PartyPEO.COUNTRY AS ADDRESS,
    PartyPEO.COUNTRY AS COUNTRY_CODE_TCA,
    TerritoryPEO.TERRITORY_SHORT_NAME AS COUNTRY_NAME,
    PartyPEO.JGZZ_FISCAL_CODE AS TAX_PAYER_ID,
    PartyPEO.DUNS_NUMBER_C AS DUNS_NUMBER,
    PartyPEO.Party_Number as Party_Num_Calc,
    null as REGISTRATION_TYPE_NAME,
    null as ROUNDING_LEVEL_NAME,
    null as ROUNDING_RULE_NAME,
    null as COUNTRY_NAME_PTP,
    'ZX_PARTY_TAX_PROFILE' as TAX_REPORTING_ENTITY_CODE
    FROM ZX_PARTY_TAX_PROFILE ThirdPartyTaxProfileEO,
    HZ_PARTIES PartyPEO,
    FND_LOOKUP_VALUES_VL LkupPartyUsage,
    FND_TERRITORIES_VL TerritoryPEO
    WHERE ThirdPartyTaxProfileEO.PARTY_ID = PartyPEO.PARTY_ID AND
    LkupPartyUsage.LOOKUP_CODE = decode(ThirdPartyTaxProfileEO.CUSTOMER_FLAG,
    'Y',decode(ThirdPartyTaxProfileEO.SUPPLIER_FLAG,
    'Y', 'SC',
    'C'),
    decode(ThirdPartyTaxProfileEO.SUPPLIER_FLAG,
    'Y', 'S',
    NULL)
    ) AND
    PartyPEO.COUNTRY = TerritoryPEO.Territory_Code (+) AND
    LkupPartyUsage.LOOKUP_TYPE = 'ZX_TP_PARTY_USAGE'
    ORDER BY UPPER(PARTY_FULL_NAME)) QRSLT WHERE UPPER(PARTY_NAME) IS NOT
    NULL
    Any help will be appreciated

    You can rewrite your where clause to not use decode or case statements e.g. this:
      AND LkupPartyUsage.LOOKUP_CODE = DECODE( ThirdPartyTaxProfileEO.CUSTOMER_FLAG
                                , 'Y', DECODE( ThirdPartyTaxProfileEO.SUPPLIER_FLAG, 'Y', 'SC', 'C' )
                                     , DECODE( ThirdPartyTaxProfileEO.SUPPLIER_FLAG, 'Y', 'S', NULL ) )
                                     )can be rewritten to this:
    and (
          ( ThirdPartyTaxProfileEO.CUSTOMER_FLAG = 'Y'  AND
              ((ThirdPartyTaxProfileEO.SUPPLIER_FLAG = 'Y' AND LkupPartyUsage.LOOKUP_CODE = 'SC') or
                ThirdPartyTaxProfileEO.SUPPLIER_FLAG != 'Y' AND LkupPartyUsage.LOOKUP_CODE = 'C')) or
          ( ThirdPartyTaxProfileEO.CUSTOMER_FLAG != 'Y'  AND
              ((ThirdPartyTaxProfileEO.SUPPLIER_FLAG = 'Y' AND LkupPartyUsage.LOOKUP_CODE = 'S') or
                ThirdPartyTaxProfileEO.SUPPLIER_FLAG != 'Y' AND LkupPartyUsage.LOOKUP_CODE is null))
        )It's not as sussinct, but it avoids the use of functions that could be preventing the optimiser from using an index.

Maybe you are looking for

  • Planning form

    Hi, Would anybody know how to create a Planning form that allows users to save data at an upper level member? I can submit the data at an upper level through an adhoc query in Smart View, but I don't have the same access when using the Planning form

  • Screensaver never starting when iTunes plays music

    Hi, I have recently bought a Mac mini that I've put in my living room, connected to my flat screen. The Mac mini is connected by HDMI to my Audio/Video amplifier (Denon) which connects by HDMI to my flat screen. This is fantastic to sit in the sofa t

  • Photoshop Elements 8 Crash

    After years of use, Photoshop Elements 8 now crashes upon opening or upon trying to access a Create option.  Re-installed with same results.  Solution?

  • Number of Frames in Animation?

      Hello! I was just wondering if there was anyway to figure out how many frames you have in an animation? Thank you if someone can tell me.

  • Compare floating poit numbers

    Hello, I'm using TestStand and LabVIEW. What is the best way to compare floating point numbers in TestStand flow? Thanks in advance.