Problem with REGEXP_SUBSTR related query.

I am having a problem with this query:
SELECT *
  FROM (    SELECT REGEXP_SUBSTR ('{SUMMER}|{POINT OF SALE}',
                                           '({)([A-Z]+ *[A-Z]*)(})',
                                           1,
                                           LEVEL,
                                           'i',
                                           2)
                               val
              FROM DUAL
        CONNECT BY LEVEL <=
                      REGEXP_COUNT ('{SUMMER}|{POINT OF SALE}', '|') + 1)
WHERE val IS NOT NULL
I need the output in 2 rows in this format:
VAL
====
SUMMER
POINT OF SALE
But I am not able to get 'POINT OF SALE' in the output because of the blank space, or maybe some other reason. Can anyone correct my query?

So you want something like this?
SQL> ed
Wrote file afiedt.buf
  1  SELECT *
  2    FROM (    SELECT REGEXP_SUBSTR ('{SUMMER}|{POINT OF SALE}', '[^{|}]+', 1, LEVEL, 'i') val
  3                FROM DUAL
  4          CONNECT BY LEVEL <=
  5                        REGEXP_COUNT ('{SUMMER}|{POINT OF SALE}', '[^|]+'))
  6*  WHERE val IS NOT NULL
SQL> /
VAL
SUMMER
POINT OF SALE
SQL>

Similar Messages

  • Problems with Input Ready Query

    Hello All,
    I'm facing problems with input ready query for BI IP.
    I've created the input query on aggregation level and maintianed all the planning settings.  It is not allowing me to edit, when i'm attaching in the web template.
    I also attached a button copy function, and i'm able to execute it and save it, but it not allowing me to change manually.
    I also enabled the 3rd option for keyfigures...data can be changed with planning functions and user input.
    Please help me in this regard.
    We have just started the development of BI-IP, please suggest me if there are any notes to be applied.
    Regards
    Kumar

    Hello Johannes,
    Yes I've set to the finest granularity...even if it is Only one characteristic and one key figure without any restrictions...
    I've checked even planning tab page under properties...it is also fine..
    But still it is not allaowing me to go to edit mode...this is a fresh instalation and the query i'm working is the first one...
    Please suggest me if there are any notes to be applied, we are on Support Pack 10.
    Regards
    Jeevan Kumar

  • Problem With router related to mIRC?

    Hi Everyone,
                        I am having problem with my router (model = WRT54G2 and version = 1) related to mirc, the problem is that whenever i recieve or try to send someone a code something like this I'm a QUEER?DCC SEND "gay???g?" 0 0 0 i get dc. First i thought that it's some problem with mIRc so i went into their help community and asked them but one of their guys said that it's not mIRC's problem it's some problem with my router and he gaved me two solutions:
    There are really only 2 real solutions:
    1. get another router or update your router's fimware
    2. (if the network supports it) connect with SSL to the IRC server. This encrypts text between the server and mIRC and your router will be unable to read the contents of the packets coming from the IRC server
    i tried the 2nd one and it worked i dont get dc anymore but the problem is that only 5-6 servers on mirc support ssl so it cant be possible and as far as the first option is concerned i tried to upgrade my firm but it didn't helped me the problem is still there so if you guys can find me a way i will be really thankful to ya cos i dont wanna buy a new router now....Thanks.
    NOTE: in case you dont believe me that i had help from mirc support forum you can check out this link: http://trout.snt.utwente.nl/ubbthreads/ubbthreads.php?ubb=showflat&Number=212660&page=1#Post212660
    NOTE#2: i have tried connecting to mirc without my router with direct net and that code doesn't works when i stay connected with direct net.
    Message Edited by Masterpiece on 06-02-2009 07:38 PM
    Message Edited by Masterpiece on 06-02-2009 07:39 PM

    well i cant go for SSL cos the servers on mIRC which are supporting SSL are a bit lame , i want this problem to be fixed and as far as resetting is concerned why to reset after firmware upgrade? do we have to do it?

  • Problem with timestamp in query

    I have problem with timestamp in JPA query.
    I wonna select all data from database where difference between two timestamps is more than 3 month.
    Database:
    ID timestamp1 timestamp2
    1 20008-11-19 15:02000 20008-08-19 15:02000
    2 20008-11-19 15:02000 20008-11-14 15:02000
    @Column(name = "timestamp1", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp1;
    @Column(name = "timestamp2", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp2;
    sql query works:
    select id from table where
    MONTH( DATE(timestamp1) - DATE(timestamp2) ) > 3
    but how I can write in Java?
    I't doesnt wrk:
    Query query = em.createQuery("SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3 ")
    error:
    ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method .
    Exception data: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3'.
    Error message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "MONTH (" at character 438, but expected: ["(", "+", "-", ".", ":", "", "=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1665)
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:1645)

    The error is indocating improper formatting of your JPQL string. MONTH is not understood. I would recommend using your SQL string in a createNativeQuery(...) call instead.
    Doug

  • Problem with unit in Query

    Hallo Experts,
    We encounter a problem with unit in our Query.
    Szenario:
    We use the Unit like PC, SET in Query.
    In Table T006 those Units have value 0 in the field ANDEC, so they will be rounded up and rounded down in Query.
    Our Problem is some Queries need the rounding up and down but others don't need this function.
    Where and how should we change to solve the problem.
    thanks & Best regards

    hi,
    if you want to control the rounding off while unit conversion you can do it from SPRO
    In the BW system, goto SPRO -> SAP NetWeaver -> General Settings -> Check Units of Measurement -> Units of Measurement -> Choose the unit corresponding to 'KM' -> Click on 'Details' button in the toolbar.
    Look the field 'Decimal Pl rounding'. Change this to 3 or whatever value you choose and see if it works.
    in above link i have taken example of KM, you need need to select the required unit.
    let us know if this is solves your problem. I am not sure if this can be done for individual queries but this is controlled by UOM wise as mentioned above.
    Regards,
    Rk.

  • Problem with a Bex Query Report with Web Intelligence

    Hello!
    I have a Bex query (with query Bex version 7.0) I'm connecting with Web Intelligence (4.0) but one of the attributes instead of displaying the description shows only the key, and it is strange because other cubes if given by the conversion.
    I wonder if there is a solution for this or if it is a problem of version 4.0 of Web Intelligence.
    I await your response,
    Greetings!

    Hi,
    Whereabouts in the application are you seing this problem?  (in the query panel conditions, in the prompt list of values, or in the table block? )
    also, what do you mean by "and it is strange because other cubes if given by the conversion" ?
    it's worth noting that the "key and text display properties" in the Bex Query Designer do not influence webi.  WebI consumes the global infoobject property from BW RSH1.
    Regards,
    H
    p.s. if you need to understand which features are or are not supported with BI 4.0 tools, please look here: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d056e1bc-2794-2e10-959e-8779c5623cc5

  • Performance problem with relatively simple query

    Hi, I've a statement that takes over 20s. It should take 3s or less. The statistics are up te date so I created an explain plan and tkprof. However, I don't see the problem. Maybe somebody can help me with this?
    explain plan
    SQL Statement which produced this data:
      select * from table(dbms_xplan.display)
    PLAN_TABLE_OUTPUT
    | Id  | Operation               |  Name              | Rows  | Bytes |TempSpc| Cost  |
    |   0 | SELECT STATEMENT        |                    | 16718 |   669K|       | 22254 |
    |   1 |  SORT UNIQUE            |                    | 16718 |   669K|    26M| 22254 |
    |   2 |   FILTER                |                    |       |       |       |       |
    |*  3 |    HASH JOIN            |                    |   507K|    19M|       |  9139 |
    |   4 |     TABLE ACCESS FULL   | PLATE              | 16718 |   212K|       |    19 |
    |*  5 |     HASH JOIN           |                    |   507K|    13M|  6760K|  8683 |
    |*  6 |      HASH JOIN          |                    |   216K|  4223K|       |  1873 |
    |*  7 |       TABLE ACCESS FULL | SDG_USER           |  1007 |  6042 |       |     5 |
    |*  8 |       HASH JOIN         |                    |   844K|    11M|       |  1840 |
    |*  9 |        TABLE ACCESS FULL| SDG                |  3931 | 23586 |       |     8 |
    |  10 |        TABLE ACCESS FULL| SAMPLE             |   864K|  6757K|       |  1767 |
    |* 11 |      TABLE ACCESS FULL  | ALIQUOT            |  2031K|    15M|       |  5645 |
    |  12 |    INDEX UNIQUE SCAN    | PK_OPERATOR_GROUP  |     1 |     5 |       |       |
    |  13 |    INDEX UNIQUE SCAN    | PK_OPERATOR_GROUP  |     1 |     5 |       |       |
    |  14 |    INDEX UNIQUE SCAN    | PK_OPERATOR_GROUP  |     1 |     5 |       |       |
    |  15 |    INDEX UNIQUE SCAN    | PK_OPERATOR_GROUP  |     1 |     5 |       |       |
    Predicate Information (identified by operation id):
       3 - access("SYS_ALIAS_2"."PLATE_ID"="SYS_ALIAS_1"."PLATE_ID")
       5 - access("SYS_ALIAS_3"."SAMPLE_ID"="SYS_ALIAS_2"."SAMPLE_ID")
       6 - access("SYS_ALIAS_4"."SDG_ID"="SDG_USER"."SDG_ID")
       7 - filter("SDG_USER"."U_CLIENT_TYPE"='QC')
       8 - access("SYS_ALIAS_4"."SDG_ID"="SYS_ALIAS_3"."SDG_ID")
       9 - filter("SYS_ALIAS_4"."STATUS"='C' OR "SYS_ALIAS_4"."STATUS"='P' OR "SYS_ALIA
                  S_4"."STATUS"='V')
      11 - filter("SYS_ALIAS_2"."PLATE_ID" IS NOT NULL)
    Note: cpu costing is off
    tkprof
    TKPROF: Release 9.2.0.1.0 - Production on Mon Sep 22 11:09:37 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Trace file: d:\oracle\admin\nautp\udump\nautp_ora_5708.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    alter session set sql_trace true
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        1      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer goal: CHOOSE
    Parsing user id: 61 
    SELECT distinct p.name
    FROM lims_sys.sdg sd, lims_sys.sdg_user sdu, lims_sys.sample sa, lims_sys.aliquot a, lims_sys.plate p
    WHERE sd.sdg_id = sdu.sdg_id
    AND sd.sdg_id = sa.sdg_id
    AND sa.sample_id = a.sample_id
    AND a.plate_id = p.plate_id
    AND sd.status IN ('V','P','C')
    AND sdu.u_client_type = 'QC'
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.09       0.09          0          3          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      7.67      24.63      66191      78732          0         500
    total        3      7.76      24.72      66191      78735          0         500
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 61 
    Rows     Row Source Operation
        500  SORT UNIQUE
    520358   FILTER 
    520358    HASH JOIN 
      16757     TABLE ACCESS FULL PLATE
    520358     HASH JOIN 
    196632      HASH JOIN 
       2402       TABLE ACCESS FULL SDG_USER
    834055       HASH JOIN 
       3931        TABLE ACCESS FULL SDG
    864985        TABLE ACCESS FULL SAMPLE
    2037373      TABLE ACCESS FULL ALIQUOT
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (object id 33865)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (object id 33865)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (object id 33865)
          0    INDEX UNIQUE SCAN PK_OPERATOR_GROUP (object id 33865)
    select 'x'
    from
    dual
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          3          0           1
    total        3      0.00       0.00          0          3          0           1
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 61 
    Rows     Row Source Operation
          1  TABLE ACCESS FULL DUAL
    begin :id := sys.dbms_transaction.local_transaction_id; end;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0         12          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0         12          0           1
    Misses in library cache during parse: 1
    Optimizer goal: CHOOSE
    Parsing user id: 61 
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.09       0.09          0          3          0           0
    Execute      4      0.00       0.00          0         12          0           1
    Fetch        2      7.67      24.63      66191      78735          0         501
    total        9      7.76      24.72      66191      78750          0         502
    Misses in library cache during parse: 3
    Misses in library cache during execute: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse       48      0.00       0.00          0          0          0           0
    Execute     54      0.00       0.01          0          0          0           0
    Fetch       65      0.00       0.00          0        157          0          58
    total      167      0.00       0.01          0        157          0          58
    Misses in library cache during parse: 16
        4  user  SQL statements in session.
       48  internal SQL statements in session.
       52  SQL statements in session.
    Trace file: d:\oracle\admin\nautp\udump\nautp_ora_5708.trc
    Trace file compatibility: 9.00.01
    Sort options: default
           1  session in tracefile.
           4  user  SQL statements in trace file.
          48  internal SQL statements in trace file.
          52  SQL statements in trace file.
          20  unique SQL statements in trace file.
         500  lines in trace file.Edited by: RZ on Sep 22, 2008 2:27 AM

    A few notes:
    1. You seem to have either a VPD policy active or you're using views that add some more predicates to the query, according to the plan posted (the access on the PK_OPERATOR_GROUP index). Could this make any difference?
    2. The estimates of the optimizer are really very accurate - actually astonishing - compared to the tkprof output, so the optimizer seems to have a very good picture of the cardinalities and therefore the plan should be reasonable.
    3. Did you gather index statistics as well (using COMPUTE STATISTICS when creating the index or "cascade=>true" option) when gathering the statistics? I assume you're on 9i, not 10g according to the plan and tkprof output.
    4. Looking at the amount of data that needs to be processed it is unlikely that this query takes only 3 seconds, the 20 seconds seems to be OK.
    If you are sure that for a similar amount of underlying data the query took only 3 seconds in the past it would be very useful if you - by any chance - have an execution plan at hand of that "3 seconds" execution.
    One thing that I could imagine is that due to the monthly data growth that you've mentioned one or more of the tables have exceeded the "2% of the buffer cache" threshold and therefore are no longer treated as "small tables" in the buffer cache. This could explain that you now have more physical reads than in the past and therefore the query takes longer to execute than before.
    I think that this query could only be executed in 3 seconds if it is somewhere using a predicate that is more selective and could benefit from an indexed access path.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Problem with Counter in Query

    Hi Experts,
    There is a problem in my query output.
    I have a CKF for sales documents number created with replacement path which gives the correct count of number of Sales documents.
    But the req here is to create two more counters which will be counting the passed and failed count with reference to other KF1 (the value of this KF can be 0 or 1).
    i.e. If the KF1 value is then failed count would be 1 .
           else passed count would be 1.
    I have used the Replcement path variable created for Sales Document count.
    For failed count the CKF formula which I have created is: (Sales Order Count ) * (KF1<>1)
    Which gives the right result but as soon as I remove the drill down , instead of aggrading the total results, failed counter still shows 1 which is incorrect.
    Could any one please help me out.
    Regards,
    BW User

    hello,
    try using exception aggregation as total and reference char as the one which u have reomved from drilldown.
    Regds,
    Shashank

  • How can i use index in select query.. facing problem with the select query.

    Hi Friends,
    I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario.
    Here is the query:
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelat LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelatrprctr
        WHERE rldnr  = c_telstra_accounting
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          And rzzlstar in r_lstar                            
          AND rpmax  = c_max_period.
    There are 5 indices present for Table ZTFTELAT.
    Indices of ZTFTELAT:
      Name   Description                                               
      0        Primary key( RCLNT,RLDNR,RRCTY,RVERS,RYEAR,ROBJNR,SOBJNR,RTCUR,RUNIT,DRCRK,RPMAX)                                          
      005    Profit (RCLNT,RPRCTR)
      1        Ledger, company code, account (RLDNR,RBUKRS, RACCT)                                
      2        Ledger, company code, cost center (RLDNR, RBUKRS,RCNTR)                           
      3        Account, cost center (RACCT,RCNTR)                                        
      4        RCLNT/RLDNR/RRCTY/RVERS/RYEAR/RZZAUFNR                        
      Z01    Activity Type, Account (RZZLSTAR,RACCT)                                        
      Z02    RYEAR-RBUKRS- RZZZBER-RLDNR       
    Can anyone help me out why it is taking so much time and how we can reduce it ? and also tell me if I want to use index number 1 then how can I use?
    Thanks in advance.

    Hi Shiva,
    I am using two more select queries with the same manner ....
    here are the other two select query :
    ***************1************************
    SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelpt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelptrprctr
        WHERE rldnr  = c_telstra_projects
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar             
          AND rpmax  = c_max_period.
    and the second one is
    *************************2************************
      SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary
        FROM ztftelnt LEFT JOIN ztfzberep
         ON  ztfzberep~gjahr = st_input-gjahr
         AND ztfzberep~poper = st_input-poper
         AND ztfzberepcntr  = ztftelntrprctr
        WHERE rldnr  = c_telstra_networks
          AND rrcty  = c_actual
          AND rvers  = c_ver_001
          AND rbukrs = st_input-bukrs
          AND racct  = st_input-saknr
          AND ryear  = st_input-gjahr
          and rzzlstar in r_lstar                              
          AND rpmax  = c_max_period.
    for both the above table program is taking very less time .... although both the table used in above queries have similar amount of data. And i can not remove the APPENDING CORRESPONDING. because i have to append the data after fetching from the tables.  if i will not use it will delete all the data fetched earlier.
    Thanks on advanced......
    Sourabh

  • Problem with Variable in Query Designer.

    hi all,
    we have a variable ZAMREG on characteristic AM Region, where AM region is attribute for two different master data objects mastobj1 and mastobj2, we have different infosets build on these two master data objects along with some other ODS.
    now this variable ZAMREG is visible in one of the infosets only in query designer, whereas it is not visible in the other infoset.
    what could be the problem??
    thanks,
    Rk

    Hi,
    Please check if that variable is created locally or globally. If it is a local variable in any query, it will not appear in any other query.
    In anyways, you can always create one more variable if the older one is not available. This will not make much of difference. I would suggest go ahead with creating a new variable.
    Regards,
    Yogesh

  • Mapping Problem with Native SQL query

    My application uses a native SQL query to locate certain entities. It looks like this:
    SELECT UPLOADATTEMPTREF, STUDENTNUMBER, USERID, WORKITEMCODE, WORKITEMINSTURN, WORKITEMTITLE, MODULERUNCODE, STUDENTNAME, SUBMISSIONDEADLINE, UPLOADATTEMPTSERVERDATE, FILENAME, UPLOADCOMPLETESERVERDATE, NEWFILENAME, FILESIZE, FILEPATH, DOWNLOADSERVERDATE, MODULECODE, MODULETITLE
    FROM Submission_Attempt WHERE UPLOADATTEMPTREF IN (
    SELECT uploadAttemptRef FROM (" +<br /><br />                         "SELECT MAX(uploadAttemptRef) AS uploadAttemptRef, UserID, workItemInstUrn, " +<br /><br />                         "workItemCode FROM Submission_Attempt where workiteminsturn = ?1 " +<br /><br />                         "GROUP BY UserID, workItemInstUrn, workItemCode) Table1 ) " +<br /><br />                         "and uploadCompleteServerDate is not null;"<br />
    My expectation was that EclipseLink would be able to handle the mapping of the results to the entity quite happily. However, I get a NonSynchronizedVector of Objects - each Object representing one field of data.
    I need help with either:
    Converting the above SQL into JPQL so that I (hopefully) don't have to worry about the SQL or
    Understanding why this isn't working properly...
    Anyone able to help?
    Edited by: phunnimonkey on Nov 6, 2008 3:33 AM

    Never mind - the problem was to do with not specifying a class when creating the native query.

  • Problems with VO's query, clause: QRSLT

    Hi Gurus,
    I got a problem here with a vo's query, the query its fine running in sqldeveloper and toad, but when I ran it on VO's the query doesn't show me any result, what can I do to fix this problem?
    Please, I hope you can help me with this one, I'll be pending to your answer.
    Heres the query that runs fine in sqldeveloper or toad and returns me a lot of results
    SELECT ss.actual_sin, ss.idsin
    FROM xx.xx_seg_ctrl_da d
    INNER JOIN xx.xx_seg_sin ss
    ON (ss.idsin = d.idsin)
    WHERE d.status = 0 AND ss.idsin IN ('102_d','487_b','101_m','201_d')
    ORDER BY DECODE(ss._ACTUAL_SIN, 'RED','a', 'YELLOW','b','GREEN','c')
    and here's the query when run on the VO's component and doesn't return any result
    SELECT * FROM (SELECT ss.actual_sin, ss.idsin
    FROM xx.xx_seg_ctrl_da d
    INNER JOIN xx.xx_seg_sin ss
    ON (ss.idsin = d.idsin)
    WHERE d.status = 0
    ORDER BY DECODE(ss._ACTUAL_SIN, 'RED','a', 'YELLOW','b','GREEN','c')) QRSLT WHERE IDSIN IN ('102_d','487_b','101_m','201_d')
    have a nice one.
    Best Regards,
    mentor

    the second query is for rowcount. Enable the logger and see what value is getting passed as bind variable.

  • Problem with Broadcasting Web query

    I am able to broadcast the web query and I recieve the email in MS Outlook, but the report is unreadable. It has the proper header info (from, to, subject, ...), but the report itself shows up as garbled text ("Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvcmVsYXRlZDsNCiBib3VuZG").
    I tried the different output formats in Broadcaster, but no luck. Anyone else experience this?
    Thanks in advance.

    Check the o/p of the sent mail from tcode SOST. if the o/ format looks fine in SOST, the problem could be on the Mail server (Exchange or Lotus notes).
    What version of MS Outlook/ MSExchange server are you using? I have seen issues with MS Exchange 2002>.
    Thanks.

  • Problem with REGEXP_SUBSTR and the desired results

    I have table like below:
    USERNAME
    DOCNAME
    DESCRIPTION
    user1
    doc1
    yes|no|none
    user1
    doc2
    ok|not
    user1
    doc3
    allryt
    Now I want to display the table like below:
    USERNAME
    DOCNAME
    DESCRIPTION
    user1
    doc1
    yes
    user1
    doc1
    no
    user1
    doc1
    none
    user1
    doc2
    ok
    user1
    doc2
    not
    user1
    doc3
    allryt
    Now this is the query which I am executing to separate the rows:
    SELECT a.*, REGEXP_SUBSTR (description, '[^|]+', 1, LEVEL, 'i') val
                     FROM (SELECT * FROM sample_table  WHERE username='user1') a
               CONNECT BY LEVEL <=
                             REGEXP_COUNT (description, '[^|]+')
    But I am getting results like below (rows getting duplicated)
    user1
    doc1
    yes|no|none
    yes
    user1
    doc1
    yes|no|none
    no
    user1
    doc1
    yes|no|none
    none
    user1
    doc2
    ok|not
    not
    user1
    doc1
    yes|no|none
    none
    user1
    doc2
    ok|not
    ok
    user1
    doc1
    yes|no|none
    no
    user1
    doc1
    yes|no|none
    none
    user1
    doc2
    ok|not
    not
    user1
    doc1
    yes|no|none
    none
    user1
    doc3
    allryt
    allryt
    user1
    doc1
    yes|no|none
    no
    user1
    doc1
    yes|no|none
    none
    user1
    doc2
    ok|not
    not
    user1
    doc1
    yes|no|none
    none
    Can anyone correct my query or modify it?

    Try this
    SQL> with t
      2  as
      3  (
      4  select 'user1' user_name, 'doc1' doc_name, 'yes|no|none' descr from dual union all
      5  select 'User1' user_name, 'doc2' doc_name, 'ok|not' descr from dual union all
      6  select 'user1' user_name, 'doc3' doc_name, 'allryt' descr from dual
      7  )
      8   select user_name
      9        , doc_name
    10        , regexp_substr(descr, '[^\|]+', 1, level) descr
    11     from t
    12  connect by level <= length(descr) - length(replace(descr, '|')) + 1
    13      and descr = prior descr
    14      and prior sys_guid() is not null
    15    order
    16       by user_name
    17        , doc_name
    18        , level;
    USER_ DOC_ DESCR
    User1 doc2 ok
    User1 doc2 not
    user1 doc1 yes
    user1 doc1 no
    user1 doc1 none
    user1 doc3 allryt
    6 rows selected.

  • Problem with server-relative Data Connections

    I have an infopath form (2007) set up to submit data to a web service. Because we want the form to be browser-enabled, I set up data connection files to submit through. 
    When I try to submit in the browser, I get an error message. When I open the form in Infopath and submit there, I get this more detailed message: 
    "One or more data connections in your form are specified with a server-relative link, but no publish location has been defined for the form. Data connection settings will be retrieved from the server specified at design time. To enable the server-relative
    link, publish your form to a Microsoft Office Server. Certain types of server-defined Web Service connections will not work with the design time settings."
    If I hit OK here, the data submits to the web service properly. 
    I'm not sure what the problem is. My form is published to this location: 
    https://portal.company.com/ca/it/requestform/Forms/
    And the data connection library is here:
    https://portal.company.com/ca/it/connections/Forms/
    Any suggestions? Am I missing something obvious?
    thanks.

    I am able now to test my connexion succesfully after having restart my ODI.
    I can reverse my XML file too.
    But my datastores are empty except the first datastore genrated which correspond to the first Tag (the one after the root).
    Please Help...

Maybe you are looking for