Perform query on URL

Hi,
If I have a set of HTTPURI's in the database like this:
http://www.domain.com/product
http://www.domain.com/product/p1
http://www.domain.com/product/p2
http://www.domain.com/product/p3
Currently they are HTTPURIType's
is it possible somehow to create a query to get this data, something like:
select * from myTable where httpurl >= 'www.domain.com/product'
Basically I want a xpath query, but not sure if this is at all possible.
a like statement is not quite right because
where httprul like 'www.domain.com/product%'
would return:
../product
../product_1234
../product/p1 ...etc.
I want to prevent this and not have to use a messy OR clause.
thx.
S.

SELECT
          INITCAP(a.NAME_L),
          INITCAP(a.NAME_F),
          a.TEL_OFF,
          INITCAP((SELECT c.FACILITY_NAME FROM TXI_FACILITY c WHERE c.FACILITY_ID = a.OFF_LOC)) AS OFF_LOC,
          a.TEL_HOME,
          a.TEL_CELL,
          a.TEL_FAX,
          INITCAP((SELECT NAME_F||' '||NAME_L FROM TXI_PEOPLE b WHERE b.PERSON_ID = a.MGR_ID)) AS MANAGER
          FROM TXI_PEOPLE a
          WHERE UPPER(a.NAME_F||a.NAME_L) LIKE '%'||UPPER(REPLACE(REPLACE(:srch_emp,',','%'),' ','%'))||'%'
          AND a.OFF_LOC IN ('10','153','155')
          AND a.TEL_HOME = NVL(:srch_loc,a.TEL_HOME)
          AND (a.TEL_OFF LIKE '%'||:srch_phone||'%' OR (a.TEL_OFF IS NULL AND :srch_phone IS NULL))
          AND UPPER(a.EMP_STATUS) LIKE 'ACTIVE%'
I also tried adding this as well, but didn't seem to work:
          AND a.OFF_LOC IN (''''||substr('10,153,155',1,2)||'''')||
                         ',' ||(''''||substr('10,153,155',4,3)||''''||
                         ',' ||(''''||substr('10,153,155',8,3)||''''))

Similar Messages

  • How to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part

    Hi,
    I want to pass multiple query string values using the same parameter in Query String (URL) Filter Web Part like mentioned below:
    http://server/pages/Default.aspx?Title=Arup&Title=Ratan
    But it always return those items whose "Title" value is "Arup". It is not returned any items whose "Title" is "Ratan".
    I have followed the
    http://office.microsoft.com/en-us/sharepointserver/HA102509991033.aspx#1
    Please suggest me.
    Thanks | Arup
    THanks! Arup R(MCTS)
    SucCeSS DoEs NOT MatTer.

    Hi DH, sorry for not being clear.
    It works when I create the connection from that web part that you want to be connected with the Query String Filter Web part. So let's say you created a web part page. Then you could connect a parameterized Excel Workbook to an Excel Web Access Web Part
    (or a Performance Point Dashboard etc.) and you insert it into your page and add
    a Query String Filter Web Part . Then you can connect them by editing the Query String Filter Web Part but also by editing the Excel Web Access Web Part. And only when I created from the latter it worked
    with multiple values for one parameter. If you have any more questions let me know. See you, Ingo

  • QSUF (Query string url filter) and SQL Server reporting services report viewer parameters

    Hi,
    this is my issue:
    I have a SQL Server reporting services web part on a page with a report with 1 parameter, lets say it's a client list
    Then i have a QSUF that will be used to filter the clients list through the URL
    However, once i connect the filter and the report viewer web part, the parameter goes away and is no longer accessible
    I'd like to somehow keep the parameter visible, in case there is no parameter sent through the URL, i would like the user to be able to choose a client from the parameter drop down list
    I saw that there is a "send empty if no values are passed" option, but i can't seem to get this working properly and i don't know if this option will make the parameter visible again
    Any help would be appreciated
    Thanks.

    Hi,
    According to your post, my understanding is that the query string url filter web part not worked well with SQL server reproting services web part.
    Did you use the Wiki page layout in your environment?
    You can change the page to a web part page, then check whether it work.
    There is a similar thread for your reference.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/4d7584e3-8e1a-48bf-9346-32f8cb480dd1/query-string-url-filter-web-part?forum=sharepointgeneralprevious
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Frm-40505:ORACLE error: unable to perform query in oracle forms 10g

    Hi,
    I get error frm-40505:ORACLE error: unable to perform query on oracle form in 10g environment, but the same form works properly in 6i.
    Please let me know what do i need to do to correct this problem.
    Regards,
    Priya

    Hi everyone,
    I have block created on view V_LE_USID_1L (which gives the error frm-40505) . We don't need any updation on this block, so the property 'updateallowed' is set to 'NO'.
    To fix this error I modified 'Keymode' property, set it to 'updatable' from 'automatic'. This change solved the problem with frm-40505 but it leads one more problem.
    The datablock v_le_usid_1l allows user to enter the text (i.e. updated the field), when the data is saved, no message is shown. When the data is refreshed on the screen, the change done previously on the block will not be seen (this is because the block updateallowed is set to NO), how do we stop the fields of the block being editable?
    We don't want to go ahead with this solution as, we might find several similar screens nad its diff to modify each one of them individually. When they work properly in 6i, what it doesn't in 10g? does it require any registry setting?
    Regards,
    Priya

  • Having problems creating PDF from website with query-string URLs

    I have a website that I would like to create a PDF from. I am using the Create -> PDF from Web Page..., selecting the site's home page, and capturing 2 levels, with "stay on same path" and "stay on same server" checked in order to limit the scope of the crawl.
    Where the pages are at example.com/foo/ and example.com/foo/bar/, this works fine. However, where the pages are at example.com/foo/ and example.com/foo/?p=1, the page represented by the query string URL is not converted to the PDF.
    This is a problem, given that the site I want to archive as a PDF uses query strings for most of its pages.
    I have been able to individually convert a single query-string-based page into a PDF using this method, but doing this for every page on the site would be almost impossible given the sheer number of pages on the site.
    Is this a known issue? Is there a workaround other than separately capturing each page (which would be prohibitive effort)?
    I have tried this in both Acrobat Pro X and Acrobat Pro 9 for Mac, with the same results.

    Remember, Acrobat is a 32-bit application and as such cannot access all that 'extra' stuff.
    Be well...

  • Content presenter: datasource based on CMIS query with URL parameters

    Hi all,
    I am trying to create a page containing a content presenter taskflow that is based on a CMIS query containing URL parameters. In my component properties I define the following query for my datasource:
    +SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xqblIntranetSubGroep='${param.qblSubGroep}'+
    I have a URL parameter qblSubGroep containing the value "Nieuws".
    Somehow my page does not show any content. It looks like the parameter value is not passed to the data source query. When I change my query to
    SELECT * FROM ora:t:IDC:GlobalProfile WHERE ora:p:xqblIntranetSubGroep='Nieuws'
    so, I hardcode the value of my URL parameter in my query, the expected content items are shown.
    Also, I have another page containing a content presenter taskflow for a single item, based on the data source:
    +${'WebCenterSpaces-UCM#dDocName:'}${param.dDocName}+
    In this case, URL parameter values for dDocName are passed correctly and content presenter is showing the document with dDocName as entered in the URL.
    Does anybody have any idea on how to solve this probem?
    regards,
    Harold

    hi all
    when i try using cmis query with Arabic characters it display no results .
    SELECT * FROM ora:t:IDC:GlobalProfile WHERE AND ora:p:xAgrPressMag LIKE'جريدة الرياض'
    this is the query i am using and the value inside ora:p:xAgrPressMag is correct and i try search this value inside content presenter normal search and it display results i am afraid that cmis query doesnt accept arabic characters
    any suggestion please its top urgent
    best regards
    Edited by: 975169 on Feb 26, 2013 12:59 AM

  • ? Mail [12721] Error 1 performing query: WHERE clause too complex...

    Console keeps showing this about a zillion times in a row, a zillion times a day: "Mail [12721] Error 1 performing query: WHERE clause too complex no more than 100 terms allowed"
    I can't find any search results anywhere online about this.
    Lots of stalls and freezes in mail, finder/os x, and safari -- freqent failures to maintain a broadband connection (multiple times every day).
    All apps are slow, cranky with interminable beach balls getting worse all the time.
    anyone know what the heck is going on?

    Try rebuilding the mailbox to see if that helps.
    Also, how much disk space is available on your boot drive?

  • Is this the best performed query?

    Hi Guys,
    Is this the best performed query or i can still improve it ?
    I am new to SQL performacne tune, please help to get best performance of the query.
    SQL> EXPLAIN PLAN SET STATEMENT_ID = 'ASH'
    2 FOR
    3 SELECT /*+ FIRST_ROWS(30) */ PSP.PatientNumber, PSP.IntakeID, U.OperationCenterCode OpCenterProcessed,
    4 PSP.ServiceCode, PSP.UOMcode, PSP.StartDt, PSP.ProvID, PSP.ExpDt, NVL(PSP.Units, 0) Units,
    5 PAS.Descript, PAS.ServiceCatID, PSP.CreatedBy AuthCreatedBy, PSP.CreatedDateTime AuthCreatedDateTime,
    6 PSP.AuthorizationID, PSP.ExtracontractReasonCode, PAS.ServiceTypeCode,
    7 NVL(PSP.ProvNotToExceedRate, 0) ProvOverrideRate,
    8 prov.ShortName ProvShortName, PSP.OverrideReasonCode, PAS.ContractProdClassId
    9 ,prov.ProvParentID ProvParentID, prov.ProvTypeCd ProvTypeCd
    10 FROM tblPatServProv psp, tblProductsAndSvcs pas, tblProv prov, tblUser u, tblGlMonthlyClose GLMC
    11 WHERE GLMC.AUTHORIZATIONID >= 239
    12 AND GLMC.AUTHORIZATIONID < 11039696
    13 AND PSP.AuthorizationID = GLMC.AUTHORIZATIONID
    14 AND PSP.Authorizationid < 11039696
    15 AND (PSP.ExpDt >= to_date('01/03/2000','MM/DD/YYYY') OR PSP.ExpDt IS NULL)
    16 AND PSP.ServiceCode = PAS.ServiceCode(+)
    17 AND prov.ProvID(+) = PSP.ProvID
    18* AND U.UserId(+) = PSP.CreatedBy
    19 /
    Explained.
    Elapsed: 00:00:00.46
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    Plan hash value: 3602678330
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 8503K| 3073M| 91 (2)| 00:00:02 |
    |* 1 | HASH JOIN RIGHT OUTER | | 8503K| 3073M| 91 (2)| 00:00:02 |
    | 2 | TABLE ACCESS FULL | TBLPRODUCTSANDSVCS | 4051 | 209K| 16 (0)| 00:00:01 |
    | 3 | NESTED LOOPS | | 31 | 6200 | 75 (2)| 00:00:01 |
    | 4 | NESTED LOOPS OUTER | | 30 | 5820 | 45 (3)| 00:00:01 |
    |* 5 | HASH JOIN RIGHT OUTER | | 30 | 4950 | 15 (7)| 00:00:01 |
    | 6 | TABLE ACCESS FULL | TBLUSER | 3444 | 58548 | 12 (0)| 00:00:01 |
    |* 7 | TABLE ACCESS FULL | TBLPATSERVPROV | 8301K| 585M| 2 (0)| 00:00:01 |
    | 8 | TABLE ACCESS BY INDEX ROWID| TBLPROV | 1 | 29 | 1 (0)| 00:00:01 |
    |* 9 | INDEX UNIQUE SCAN | PK_TBLPROV | 1 | | 0 (0)| 00:00:01 |
    |* 10 | INDEX UNIQUE SCAN | PK_W_GLMONTHLYCLOSE | 1 | 6 | 1 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - access("PSP"."SERVICECODE"="PAS"."SERVICECODE"(+))
    5 - access("U"."USERID"(+)="PSP"."CREATEDBY")
    7 - filter(("PSP"."EXPDT">=TO_DATE('2000-01-03 00:00:00', 'yyyy-mm-dd hh24:mi:ss') OR
    "PSP"."EXPDT" IS NULL) AND "PSP"."AUTHORIZATIONID">=239 AND "PSP"."AUTHORIZATIONID"<11039696)
    9 - access("PROV"."PROVID"(+)="PSP"."PROVID")
    10 - access("PSP"."AUTHORIZATIONID"="GLMC"."AUTHORIZATIONID")
    filter("GLMC"."AUTHORIZATIONID">=239 AND "GLMC"."AUTHORIZATIONID"<11039696)
    28 rows selected.
    Elapsed: 00:00:00.42

    Thanks a lot for your reply.
    Here are the indexes on those tables.
    table --> TBLPATSERVPROV ---> index PK_TBLPATSERVPROV ---> column AUTHORIZATIONID
    table --> TBLPRODUCTSANDSVCS ---> index PK_TBLPRODUCTSANDSVCS ---> column SERVICECODE
    table --> TBLUSER ---> index PK_TBLUSER ---> column USERID

  • FRM-40505  Oracle Error: Unable to perform query(URGENT)

    Hi I developed a form with a control_block and table_block(based on table)
    in same Canvas.
    Based on values on control_block and pressing Find button detail block will be queried.
    Control_block ->
    textitem name "payment_type" char type
    text item name "class_code " char type
    push button "find"
    base table: --> payment_terms(termid,payment_type,class_code,other colums)
    table_block is based on above table
    Now I have written when-button-pressed trigger on find button..
    declare
    l_search varchar2(100);     
    BEGIN
    l_search := 'payment_type='|| :control_block .payment_type||' AND class_code='||:control_block .class_code ;
    SET_BLOCK_PROPERTY('table_block',DEFAULT_WHERE,l_search);
    go_block('table_block');
    EXECUTE_QUERY;
    EXCEPTION
         when others then
         null;
    END;
    I am getting
    FRM-40505 Oracle Error: Unable to perform query
    please help..

    You don't need to build the default_where at run time. Just hard-code the WHERE Clause property as:
        column_x = :PARAMETER.X
    But, if for some compelling reason, you MUST do it at run time this should work:
        Set_block_property('MYBLOCK',Default_where,
            'COLUMN_X=:PARAMETER.X');
    Note that there are NO quotes except for first and last. If you get some sort of error when you query, you should actually see :Parameter.X replaced with :1 when you do Help, Display Error.

  • Can anyone tell me the difference in performance between CSS URL switching

    first
    Can anyone tell me the difference in performance between CSS URL switching and F5 Big-IP?
    second
    Can anyone tell me the difference in performance between CSS URL switching and alteon ?
    third what is best overally?
    i think alteon is best
    is that right?
    best regard

    It looks like the primary question here is performance, in which case:Performance is not an issue, so long is it is sufficient. In the case of CSS 11000 and Alteon, performance fall within the same order of magnitude (supporting web sites with several billion hits per day.) F5 does not have sufficient performance, due to platform and OS limitations (I’ve heard as low as 50 connections per second in complex configurations). The Cisco CSM posts up over 10x the performance at 200k flows/second.
    Typically the primary concern is features, then CSS 11000 switches lead with a wide and flexible array of features that are not only helpful to network and web administrators, but well integrated too. CSS 11000 switches offer configuration through CLI, Web GUI, and XML. CSS 11000 collects statistics that can be exported to non-Cisco applications for billing and management.
    The CSS11000 also supports URL load balancing and HTTP header balancing within one content rule, with complex matching. Further, it supports user agent, pragma/no-cache, host field, cookie field, language field, accept, accept charset, accept-encoding, and Connection within the http header field.
    In addition, the CSS11000 matches up to 128 bytes with support of wildcards anywhere within the string.On the other hand, Nortel (Alteon) - HTTP header load balancing is not supported on the same VIP as URL load balancing. Eg. This means that a simulated WAP user cannot be directed to a server while load balancing "normal" browsers to their servers based on URL without using two separate VIPs. Only ONE http header load balance is supported on the entire switch. This limits you to either User Agent (WAP, Netscape, IE, Palm, etc), OR pragma/no cache (do not send the user to cache, allow (the user) to go to the origin), or Host field (allowing you to direct on domain name), or Cookie. Also, Nortel does not support the language field.
    In regards to F5, many of the performance claims are based on HTTP 1.0 requests (most web sites today are not using HTTP 1.0), Many emerging applications rely on HTTP 1.1 rather than HTTP 1.0. Also, the BIG-IP cannot spoof the connection to detect the URL, cannot do NAT on the flow, and cannot maintain states for persistent connections.
    Overall, I think CSS switches are the lowest cost to own, and most effective of all the load balancing platforms on the market.

  • Difference: SAP BW Report iview - Query iView - URL iView

    Hi,
    I want to show BW reports on the portal. Can anybody suggest me the different ways of doing it ? And also let me know about checklist of steps that need to be performed.
    Can anybody tell me the difference between showing BW reports through URL iviews, showing reports through Query iView and showing reports through SAP BW Report iView ?
    Which one can i use for showing BW reports taking into consideration the implementation of SSO between the two? I tried the URL iView (using the Web URL of reports generated by BW) but it asks for Username/password. Is that the problem with SSO. How can i check if SSO parameters have been set or not. I have imported the verify.der to BW System and added that to ACL. Is there anything else which is required?
    Thanks in advance.
    Rgds,
    MA

    Hi Manoj,
    I feel BW report iview will solve your problem. You can create a query sting in BW query designer and give the same in BW query  string text area while creating BW report iview.
    In the case of an url iview you are just giving a URL link of the BW report (this will ask for username/password).
    But, in the case of a BW report iview you can view the required query as an iview (user mapping can be successfully done in this case) You should give fully qualified domain name in Was server option while creating the system.
    While using the logon ticket Login id of both the system (ie BW and Portal) should be the same.
    Refer the link for SSO using logon ticket)
    User Mapping-based Single Sign On
    Regards,
    Vinod

  • Increase performance query more than 10 millions records significantly

    The story is :
    Everyday, there is more than 10 million records which the data in textfiles format (.csv(comma separated value) extension, or other else).
    Example textfiles name is transaction.csv
    Phone_Number
    6281381789999
    658889999888
    618887897
    etc .. more than 10 million rows
    From transaction.csv then split to 3 RAM (memory) tables :
    1st. table nation (nation_id, nation_desc)
    2nd. table operator(operator_id, operator_desc)
    3rd. table area(area_id, area_desc)
    Then query this 3 RAM tables to result physical EXT_TRANSACTION (in harddisk)
    Given physical External Oracle table name EXT_TRANSACTION with column result is :
    Phone_Number Nation_Desc Operator_Desc Area_Desc
    ======================================
    6281381789999 INA SMP SBY
    So : Textfiles (transaction.csv) --> RAM tables --> Oracle tables (EXT_TRANSACTION)
    The first 2 digits is nation_id, next 4 digits is operator_id, and next 2 digits is area_id.
    I ever heard, to increase performance significantly, there is a technique to create table in memory (RAM) and not in harddisk.
    Any advice would be very appreciate.
    Thanks.

    Oracle uses sophisticated algorithms for various memory caches, including buffering data in memory. It is described in Oracle® Database Concepts.
    You can tell Oracle via the CACHE table clause to keep blocks for that table in the buffer cache (refer to the URL for the technical details of how this is done).
    However, this means there are now less of the buffer cache available to cache other data often used. So this approach could make accessing one table a bit faster at the expense of making access to other tables slower.
    This is a balancing act - how much can one "interfere" with cache before affecting and downgrading performance. Oracle also recommends that this type of "forced" caching is use for small lookup tables. It is not a good idea to use this on large tables.
    As for your problem - why do you assume that keeping data in memory will make processing faster? That is a very limited approach. Memory is a resource that is in high demand. It is a very finite resource. It needs to be carefully spend to get the best and optimal performance.
    The buffer cache is designed to cache "hot" (often accessed) data blocks. So in all likelihood, telling Oracle to cache a table you use a lot is not going to make it faster. Oracle is already caching the hot data blocks as best possible.
    You also need to consider what the actual performance problem is. If your process needs to crunch tons of data, it is going to be slow. Throwing more memory will be treating the symptom - not the actual problem that tons of data are being processed.
    So you need to define the actual problem. Perhaps it is not slow I/O - there could be a user defined PL/SQL function used as part of the ELT process that causes the problem. Parallel processing could be use to do more I/O at the same time (assuming the I/O subsystem has the capacity). The process can perhaps be designed better - and instead of multiple passes through a data set, crunching the same data (but different columns) again and again, do it in a single pass.
    10 million rows are nothing ito what Oracle can process on even a small server today. I have dual CPU AMD servers doing over 2,000 inserts per second in a single process. A Perl program making up to a 1,000 PL/SQL procedure calls per second. Oracle is extremely capable - as it today's hardware and software. But that needs a sound software engineering approach. And that approach says that we first need to fully understand the problem before we can solve it, treating the cause and not the symptom.

  • Performance query in sql

      
    This query takes 1 mins to execute, Please suggesr if we can improve more on performance
      SELECT P.ProgramId
                      ,P.Tier4Id
                    ,7 AS MetricId
                    ,(convert(DATETIME, CONVERT(VARCHAR, Month(s.DATE)) + '/1/' + CONVERT(VARCHAR, Year(s.DATE)))) AS DATE
                    ,CASE
                        WHEN SUM(ISNULL(S.ITD_BCWS_PMB, 0)) <> 0
                            THEN ROUND(SUM(ISNULL(S.ITD_BCWP_PMB, 0)) / SUM(ISNULL(S.ITD_BCWS_PMB, 0)), 2)
                        ELSE NULL
                        END AS Value
                    ,SUM(ISNULL(S.ITD_BCWP_PMB, 0)) AS BCWP
                FROM Staging.SPI_CPI_WBS S
                INNER JOIN Core.Projects PJ ON S.ProjectId = PJ.ProjectId AND PJ.IsActive = 1
                INNER JOIN Core.ProgramFinancials PF ON PF.ProgramId = S.ProgramId AND Year(PF.DATE) = Year(S.DATE) AND PF.IsYearly = 1
                INNER JOIN Core.v_WBS_Tier_Structure_SPICPI P ON S.WBSId = P.WBSId AND P.ProgramId = S.ProgramId
                WHERE S.LSKINdicator = 1 AND S.ProjectId IS NOT NULL
                    /*AP3-820 Check for BCWP > 0*/
                    AND ISNULL(S.ITD_BCWP_PMB, 0) > 0 AND (P.ProgramStatus = 1 OR isnull(PF.Spend, 0) != 0)
                GROUP BY P.ProgramId
                    ,s.DATE
                    ,P.Tier4Id
                HAVING SUM(ISNULL(S.ITD_BCWP_PMB, 0)) > 0
    Smash126

    Hi This entire query i am posting see if any more optimization can be done please
     UPDATE DW.ProgramScores_T4_P    
     SET     
      SPI=null    
      ,SPI_H=null    
      ,CPI=null    
      ,CPI_h=null    
      , M_SPI = null    
      ,M_SPI_H = null    
      ,M_CPI = null    
      ,M_CPI_H = null    
     where Date  between dateadd(mm,-12,getdate()) and getdate()       
    -- SPI CPI - Programscores    
    MERGE DW.ProgramScores_T4_P DW    
    USING      
    SELECT   isnull(SPI.ProgramId, CPI.ProgramId) AS ProgramId    
      ,isnull(SPI.DATE, CPI.DATE) AS DATE    
         ,isnull(SPI.Tier4Id,CPI.Tier4Id) as Tier4Id     
      ,SPI    
      ,SPI_H    
      ,CPI    
      ,CPI_H    
      ,CASE     
       WHEN isnull(SPI.DATE, CPI.DATE) BETWEEN dateadd(mm, - 12, getdate()) AND getdate()    
        THEN 1    
       ELSE 0    
       END AS Datediff    
      ,Month(isnull(SPI.DATE, CPI.DATE)) AS Month    
      ,Year(isnull(SPI.DATE, CPI.DATE)) AS Year    
    FROM (    
     SELECT SPI.ProgramId    
      ,SPI.Metricid    
      ,Tier4Id    
      ,DATE    
      ,SPI    
      ,SPI_H    
     FROM (    
      SELECT ProgramId    
       ,Tier4Id    
       ,A.MetricId    
       ,DATE    
       ,Value AS SPI    
        CASE     
         WHEN [Value] IS NULL OR [IsGoalOriented] = (0) OR [IsGoalOriented] IS NULL /*OR MBM.fn_CheckGoalsAvailability(A.MetricId) = 0 */    
          THEN (5)    
         ELSE CASE     
           WHEN [Value] >= [LCLG] AND [Value] <= [UCLG] OR [Value] >= [LCLG] AND [UCLG] IS NULL    
            THEN (2)    
           ELSE CASE     
             WHEN [Value] >= [LCLY] AND [Value] <= [UCLY]    
              THEN (3)    
             ELSE (4)    
             END    
           END    
         END    
        ) AS SPI_H    
      FROM (    
       SELECT P.ProgramId    
          ,P.Tier4Id    
        ,7 AS MetricId    
        ,(convert(DATETIME, CONVERT(VARCHAR, Month(s.DATE)) + '/1/' + CONVERT(VARCHAR, Year(s.DATE)))) AS DATE    
        ,CASE     
         WHEN SUM(ISNULL(S.ITD_BCWS_PMB, 0)) <> 0    
          THEN ROUND(SUM(ISNULL(S.ITD_BCWP_PMB, 0)) / SUM(ISNULL(S.ITD_BCWS_PMB, 0)), 2)    
         ELSE NULL    
         END AS Value    
        ,SUM(ISNULL(S.ITD_BCWP_PMB, 0)) AS BCWP    
       FROM Staging.SPI_CPI_WBS S    
       INNER JOIN Core.Projects PJ ON S.ProjectId = PJ.ProjectId AND PJ.IsActive = 1    
       INNER JOIN Core.ProgramFinancials PF ON PF.ProgramId = S.ProgramId AND Year(PF.DATE) = Year(S.DATE) AND PF.IsYearly = 1    
       INNER JOIN Core.v_WBS_Tier_Structure_SPICPI P ON S.WBSId = P.WBSId AND P.ProgramId = S.ProgramId    
       WHERE S.LSKINdicator = 1 AND S.ProjectId IS NOT NULL    
        /*AP3-820 Check for BCWP > 0*/    
        AND ISNULL(S.ITD_BCWP_PMB, 0) > 0 AND (P.ProgramStatus = 1 OR isnull(PF.Spend, 0) != 0)    
       GROUP BY P.ProgramId    
        ,s.DATE    
        ,P.Tier4Id    
       HAVING SUM(ISNULL(S.ITD_BCWP_PMB, 0)) > 0    
       ) A    
      INNER JOIN MBM.Metrics M ON M.MetricId = A.MetricId AND M.IsActive = 1    
      ) SPI    
     ) SPI    
    LEFT JOIN (    
     SELECT CPI.ProgramId    
           --,WBSId    
      ,Tier4Id    
      --,Tier3Id    
      --,Tier2Id    
      ,CPI.Metricid    
      ,DATE    
      ,CPI    
      ,CPI_H    
     FROM (    
      SELECT ProgramId    
          --,WBSId    
        ,Tier4Id    
        --,Tier3Id    
        --,Tier2Id    
       ,A.MetricId    
       ,DATE    
       ,Value AS CPI    
        CASE     
         WHEN [Value] IS NULL OR [IsGoalOriented] = (0) OR [IsGoalOriented] IS NULL /*OR MBM.fn_CheckGoalsAvailability(A.MetricId) = 0 */    
          THEN (5)    
         ELSE CASE     
           WHEN [Value] >= [LCLG] AND [Value] <= [UCLG] OR [Value] >= [LCLG] AND [UCLG] IS NULL    
            THEN (2)    
           ELSE CASE     
             WHEN [Value] >= [LCLY] AND [Value] <= [UCLY]              THEN (3)    
             ELSE (4)    
             END    
           END    
         END    
        ) AS CPI_H    
      FROM (    
       SELECT P.ProgramId    
       --,S.WBSId    
        ,P.Tier4Id    
        --,WBS.Tier3Id    
        --,WBS.Tier2Id    
        ,8 AS MetricId    
        ,(convert(DATETIME, CONVERT(VARCHAR, Month(s.DATE)) + '/1/' + CONVERT(VARCHAR, Year(s.DATE)))) AS DATE    
        ,CASE     
         WHEN SUM(ISNULL(S.ITD_ACWP, 0)) <> 0    
          THEN ROUND(SUM(ISNULL(S.ITD_BCWP_PMB, 0)) / SUM(ISNULL(S.ITD_ACWP, 0)), 2)    
         ELSE NULL    
         END AS Value    
        ,SUM(ISNULL(S.ITD_BCWP_PMB, 0)) AS BCWP    
       FROM Staging.SPI_CPI_WBS S    
       INNER JOIN Core.Projects PJ ON S.ProjectId = PJ.ProjectId AND PJ.IsActive = 1    
       --INNER JOIN Core.Programs P ON P.ProgramId = S.ProgramId and P.Isactive=1    
       INNER JOIN Core.ProgramFinancials PF ON PF.ProgramId = S.ProgramId AND Year(PF.DATE) = Year(S.DATE) AND PF.IsYearly = 1    
       --inner join Core.WBS_CAM_TIERS_Structure WBS ON S.WBSId = WBS.WBSId    
       INNER JOIN Core.v_WBS_Tier_Structure_SPICPI P ON S.WBSId = P.WBSId AND P.ProgramId = S.ProgramId    
       WHERE S.LSKINdicator = 1 AND S.ProjectId IS NOT NULL    
        /*AP3-820 Check for BCWP > 0*/    
        AND ISNULL(S.ITD_BCWP_PMB, 0) > 0 AND (P.ProgramStatus = 1 OR isnull(PF.Spend, 0) != 0)    
       GROUP BY P.ProgramId    
        ,s.DATE    
        --,S.WBSId    
        ,P.Tier4Id    
           --,WBS.Tier3Id    
           --,WBS.Tier2Id    
       HAVING SUM(ISNULL(S.ITD_BCWP_PMB, 0)) > 0 /*AP3-688 & AP3-702 Check for BCWP > 0 */    
       ) A    
      INNER JOIN MBM.Metrics M ON M.MetricId = A.MetricId AND M.IsActive = 1    
      ) CPI    
     WHERE CPI IS NOT NULL    
     ) CPI     
      ON CPI.ProgramId = SPI.ProgramId AND CPI.DATE = SPI.DATE AND     
         CPI.Tier4Id = SPI.Tier4Id --AND  CPI.Tier3Id = SPI.Tier3Id AND  CPI.Tier2Id = SPI.Tier2Id    
    )SPICPI     
      on SPICPI.ProgramId = DW.ProgramId and Datediff(dd,SPICPI.Date,DW.Date) = 0  and     
         SPICPI.Tier4Id = DW.Tier4Id --and SPICPI.Tier3Id = DW.Tier3Id and SPICPI.Tier2Id = DW.Tier2Id    
    WHEN MATCHED AND (SPICPI.Datediff = 1) THEN    
    update SET DW.SPI = SPICPI.SPI,    
         DW.SPI_H = SPICPI.SPI_H,    
         DW.CPI = SPICPI.CPI,    
         DW.CPI_H = SPICPI.CPI_H,    
         DW.UpdatedDate = getdate()    
    WHEN NOT MATCHED THEN    
    insert (ProgramId,Tier4Id, Date,SPI,SPI_H,CPI,CPI_H,CreatedDate)    
    values(SPICPI.ProgramId,SPICPI.Tier4Id,SPICPI.Date,SPICPI.SPI,SPICPI.SPI_H, SPICPI.CPI,SPICPI.CPI_H,getdate());    
    Smash126

  • ORA-01722: invalid number when performing query

    Hi,
    I am running SQL Developer on a laptop (XP Pro) accessing Oracle Applications
    Product Version     11.5.10.2
    Platform     IBM SP AIX
    OS Version     AIX
    Database     9.2.0.7.0
    Support ID     14460365
    If I run the following query it works fine -
    select
    mtrh.request_number
    ,to_number(mtrh.request_number)
    from
    mtl_txn_request_headers mtrh
    where
    to_number(mtrh.request_number) = 135060
    and mtrh.request_number = '135060' -- works with this line in!!!!
    however if I comment out the last line I get
    An error was encountered performing the requested operation :
    ORA-01722: invalid number
    The field request_number is defined as varchar2(30)
    It seems that there is something strange about the way it handles to_number in where clauses.
    Thanks
    Mick Sulley

    You have an invalid number in request_number. If you add "and mtrh.request_number = '135060' ", the result set will be reduced to only those rows which have 135060 in the column and the to_number() will work. WIthout that row, it does to_number(request_number) for all rows in order to identify the one you want. When it comes across a request_number column which contains an invalid number it reports an error.
    <preach>
    If request_number is a number then it should be stored in a number column. If it isn't, don't try an convert it to a number.
    </preach>

  • Performance query on 0IC_C03 inventory cube

    Hello,
    I am currently facing performance problems on this cube. The query is on material groups so the number of row returned are not to high.
    The cube is compressed. Could aggregates be a solution, or does this not work well on this cube because on the non-cumulative key figure?
    Does anyone have any hints on speeding this cube up? (the only tip I see in the collective note is to always compress)
    Best regards
    Jørgen

    Hi Ruud,
    Once compression with Marker update, latest balances will be created automatically for inventory cube: 0IC_C03.
    Historic moments only required to show stock status for any historic date(eg: 02-01-2008).
    If user not interested to check 3 years old status of stock, old data can be deleted selectively from cube using selective deletion.
    Go through doc: [How Tou2026 Handle Inventory Management Scenarios in BW|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f83be790-0201-0010-4fb0-98bd7c01e328?overridelayout=true]
    Srini

Maybe you are looking for

  • Exception Handling in Discoverer 10g

    I am using a PL/SQL function which will return a value to a column in Discoverer 10g .I want to give a custom message in discoverer if any error occurs in that function.Is it feasible in Discoverer?

  • Export Adobe PDF (print ) BasicTextAdornment

    Hello, We have a plugin that uses Text Adornments very much like the BasicTextAdornment sample plugin. When we choose to export to PDF our adornments are not being printed, the sample plugin BasicTextAdornment does not print either. Does any one know

  • Accessing Yahoo Busines Mail Options

    I have just been through a couple of months of **** with Yahoo! Business Mail. I haven't been able to get emails from any of my friends/clients who had a gmail account. Yahoo!'s tech told me that gmail.com was blocked, and s/he claimed s/he unblocked

  • I cannot find AirDrop anywhere on my computer?!?

    I'm not able to find (and therefore, use) AirDrop on my computer, which has MntLion.

  • How to detect how many LOV values user selects on a WEBI Prompt

    Hello Gurus, Is there a way to identify how many LOV Values the user selects on a Webi prompt that allows multiple value selection? For EG: If I have a webi and there's a prompt called State on the WEBI and the user selects "Utah", "Ohio" and "Texas"