Problems with Row_Number function

I am having problems with the Row_Number function. I am using it to assign row numbers to records where a student has a grade of pass on a module and excluding failed modules (I want it to show a 0 as row number for failed modules). The problem is that when I try to use a condition, the report still assigns a row number to a failed module though it doesnt display it (it displays a 0 which I wanted it to show). The results appear as follows:
Row number
Module
Grade
1
ModuleA
Pass
2
ModuleB
Pass
0
ModuleC
Fail
4 (instead of 3)
ModuleD
Pass
How can I make it skip assigning a row number to all failed modules? Please assist.
Thanks.

It is tricky to use rownum. Because if we generate sequence no by select max(column)+1  from table name ..we can match the where condition and assign the incremented value to the PASS condition.
On the other hand rownum generates a sequence while it is fetching the records one by one so obviously you get the above result only So i will give you an idea to fetch the records of 'PASS' condition first.
Take a look at the below query and alter it and use it on your report.
select a,b,c from (
select  0 a,module b, grade c from table where grade = 'FAIL'
union all
select rownum a,module b, grade c from table where grade = 'PASS' order by b)
order by a
So the above query generates row number only for the PASS condition.
Hope this helps...
Regards,
Soofi.

Similar Messages

  • Error thread java : problem with the function "resume 0x***"  (forum sun)

    One problem with the function of jdb occured when I tried to use it to
    pilot the processor with differents threads. In fact, I use a simple example with 2 threads.
    I stop the two threads with two breakpoint, and I want to resume one or the other (with the function "resume 0x****"), the one wich I resumed stop again on the breackpoint and I decide again to resume one or the other. All of that to obtain a tree of execution.
    I give you the code of the class and the code of jdb.
    CLASS: (it's just a object Room with a variable degre that I increment and decrement with two threads increase and decrease)
    public class Test{
         public static void main(String[] args){
              Room r = new Room();
              decrease de = new decrease(r);
              increase in = new increase(r);
              de.start();
              in.start();
    class Room {
         private volatile int degre=20;
         public void more(){
         degre += 4;
         public void less(){      
         degre -= 3;
    class decrease extends Thread{
    private Room room;
    public decrease(Room r){
              room =r;
    public void run(){
    try{ 
         while (!interrupted()){ 
              room.less();
    catch(InterruptedException e) {}
    class increase extends Thread{
    private Room room;
    public increase(Room r){
         room =r;
    public void run(){ 
         try{ 
              while (!interrupted()){
                   room.more();
    catch(InterruptedException e) {}
    JDB:
    Initializing jdb ...
    stop at Test:7Deferring breakpoint Test:7.
    It will be set after the class is loaded.
    runrun Test
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Test:7
    Breakpoint hit: "thread=main", Test.main(), line=7 bci=30
    7 in.start();
    main[1] stop at room:16
    Set breakpoint room:16
    main[1] stop at room:20
    Set breakpoint room:20
    main[1] resume
    All threads resumed.
    >
    Breakpoint hit: "thread=Thread-0", room.less(), line=20 bci=0
    20 degre -= 3;
    Thread-0[1] threads
    Group system:
    (java.lang.ref.Reference$ReferenceHandler)0x10d Reference Handler cond. waiting
    (java.lang.ref.Finalizer$FinalizerThread)0x10c Finalizer cond. waiting
    (java.lang.Thread)0x10b Signal Dispatcher running
    Group main:
    (decrease)0x146 Thread-0 running (at breakpoint)
    (increase)0x147 Thread-1 running (at breakpoint)
    (java.lang.Thread)0x148 DestroyJavaVM running
    Thread-0[1] resume 0x147
    Thread-0[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] print degre
    degre = 24
    Thread-1[1] resume 0x146 //It's here the problem, thread 0x146 have to stop on the //next breakpoint of decrease but nothing happen
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] clear
    Breakpoints set:
    breakpoint Test:7
    breakpoint room:16
    breakpoint room:20
    PS: I tried many other examples with other class and other kind of breakpoints, but, in any cases, on thread doesn't manage to resume. When I try with general resume (no specification of the thread), It works but it isn't interresting for me because I want to decide wich thread continue his execution.

    Hi,
    I have read the FAQ of the JMF.
    The problem was the jar files of the JMF were not in the JRE\BIN\EXT
    folder of the Java runtime!
    now it works!
    thanks
    Reg

  • Problem with 'GetType' Function calling in MSVC++

    Hello
    I have problem with the function in TestStand API .
    When I call the function " GetType " with the following statements in
    a DLL called from TestStand (NI) implemented in MS VC ++
    , it does not work and this exception is caught by the ONLY ' try catch ' block
    to catch exceptions in TestStand API giving the error message
    " Unexpected operating system error".
    VARIANT_BOOL ok;
    VARIANT_BOOL hi;
    BSTR Name;
    PropertyObject *property = (*step_)->AsPropertyObject();
    ( *step_ is a STEP Object of type Step* *step_ )
    property = property->GetPropertyObject( "TS.SData", 0);
    enum TS:ropertyValueTypes i = property->GetType( "" , 0 , &hi , &ok
    , &Name);//Problem
    Please solve my problem.
    You can email me at [email protected]
    Thankyou very much.
    Best regards
    Fahad Ejaz

    Hello,
    The problem is that the Name is not initialized (the BSTR is defined as OLECHAR*). Thus, replace the
    BSTR Name;
    declaration with the following lines:
    char buf[1024];
    BSTR Name = _bstr_t(buf);
    This should solve the problem.
    Best Regards,
    Silvius
    Silvius Iancu

  • Problem with CONTAINS function

    Hi all!!
    i got a problem with contains function. i'm running oracle 11g.
    if i execute this query:
    SELECT x.lid as id,  x.sztitular as titular, e.szname as proName, x.szresumen  as resumen, b.sztitle  as catName,
    f.szname  as secName, d.szname  as cliName, x.datecreation as datecreation
    FROM CPR_PRACTICAL_CASE x,ctg_category b, CPR_CLIENT d, pro_product e, CAT_SECTOR f, CPR_PCASE_PRODUCT g, CPR_PCASE_SECTOR h,
    PRO_PRODUCTCATEGORY i WHERE  x.lid = g.lpcaseid and e.lid = g.lproductid and x.lid = h.lpcaseid
    and f.lid = h.lsectorid and x.lclientid = d.lid and i.lproductid = e.lid and  b.lid = i.lcategoryid
    AND x.szlocale = 'es-ES' AND  x.bavailable = '1'i get 1 row as result with the column sztitular = "rodillos de medidas"
    if i only add one more sentece to that query:
    AND CONTAINS( x.sztitular, 'rodillos',1) >0the query returns an empty set.. i really don't understand why because the term "rodillos" is present in the row's column called "sztitular"...
    i've put an index on that column:
    create index ITXT_TITULAR on CPR_PRACTICAL_CASE(sztitular) INDEXTYPE IS CTXSYS.CONTEXT;any help?
    many thanks!!!!
    Edited by: ElMazzaX on May 21, 2012 5:51 PM
    Edited by: ElMazzaX on May 21, 2012 5:53 PM

    How are you synchronising the index?
    http://docs.oracle.com/cd/E11882_01/text.112/e24435/ind.htm#i1008452
    Also see the Oracle Text forum:
    Text

  • Performance problem with OLE_FLUSH_CALL function module

    Hello Everyone,
    I am facing problem with OLE_FLUSH_CALL function module (execution is taking long time which is going to be dump error).
    Could you please help me in knowing solution for this problem?
    Thanking you in advance.
    Srinivas

    Hi Srinivas,
    the OLE_FLUSH_CALL does an RFC from ABAP backend to frontend UI. So high execution time could result from high network time, for example latency between UI and backend server.
    How many UI interaction steps did you measure for the trace above? Ideally, there should only be one OLE_FLUSH_CALL per user interaction step. If its more, the application is not written in an optimized way.
    Best Regards, Randolf

  • For users having problems with Mail functionality...

    Hello! I have been having problems with Mail functionality as well, so, I took a few steps to see if I could solve the problem on my own.
    My problems were:
    Mail would freeze when sending mail, or, when I pressed quit, it would freeze.
    If I toggled between inboxes too much it would freeze up.
    Even after trying the many techniques others offered on this board, Mail still froze up. So.. here's what I did:
    1.) Turn off the auto-retrieve mail function in the preferences/general menu. Set it to a manual check. Just check it yourself every once in awhile. It may not be as convenient, but it works, trust me.
    2.) Under the fonts and colors menu, set all three fonts to the SAME font (mines Century Schoolbook, but anything works) and turn off fixed-width font. Sometimes mail has a tough time decoding and working with texts, and causes it to freeze.
    3.) Clean our your main inbox! Place the emails that you want to keep, but don't need to be in your inbox in a new folder on your inbox bar (mines aptly named 'Saved Messages.' That way, when you open up Mail to your default account, it doesn't have 1,000+ messages to index. Also, try to keep the inboxes from having more than 100-200 messages per. It seems to frown on any more than that.
    After trying these three easy, steps, restart mail and see if things run smoother. I have had no problems since these changes, and mail runs a ton better. Plus you don't have to worry about deleting your library/mail folder anymore. Let me know if things work out so I can see if my theory is a universally proven thing. Thanks and good luck!
    iMac G5 20"   Mac OS X (10.4.5)  

    Good question. I have worked very little with IMAP other than as a testing device, so, on a daily routine I cannot say how it would function. However, I can only expect that by having the option to download all emails for offline viewing selected, you are right in it being a lag creator. Another suggestion would be, if you are running a single-computer setup, to have the account delete emails from the server after recieving them on your computer. Thus, you reduce the risk of repeat downloads or unnecessary build-up on the server end. DO NOT select this option if you run multiple computer set ups on one AppleMail account system or you will cause some discrepancies and/or data loss from system to system. Or, if you have emails redirected from a seperate server to Mail (i.e. I redirect mail from my university email account into Mail so that I don't have to go to the web-mail site to check it--> just like Gmail or Yahoo etc etc) you won't be able to check them from the web-based email system if you have the system delete them. Ok that sounded confusing. Solution: have the system remove emails from the server after a week (or any period of time, just not immediately) so that, in the off-chance you need to use the online system, you will have access, and will give you a chance to check the emails on other systems without a threat of data corruption (by corruption i mean that frustrating feeling you get when you can't find that super important email that was in your inbox just 10 seconds ago on your desktop etc.)
    I will see if I can learn anything more about IMAP Ernie. Its definitley the biggest problem source for Mail, POP and .Mac being simple and functional as long as you don't play with the settings too much. As far as the issue of Offline viewing goes, try turning it off and seeing how Mail functions.
    BEFORE you turn it off, however, I recommend saving all of your emails in your inbox as a text file or something so, in case the server burps and has a brain flatuence, you don't lose anything. Been there, done that, thrown the books against the wall in a frustrated rage.
    My only reserve about the Offline Viewing is whether or not Mail will, when you click "recieve mail," have to re-download the emails from the server each time. If so, then it may end up taking longer and lagging more. The issue here is obviously minimizing the amount of activity between Mail and the email server without jeapordizing information on the server or multiple Mail programs on the same account. When we can find that balance, I think Mail's potential will be realized. Keep the questions coming.

  • Problem with BAPI_SALESORDER_CHANGE function module

    I know lot of posts have been done about problems with this function module. However I was not able to find the answer to my problem. Hence posting a new thread
    I have the following code which changes the reason rejection (if required to 'ZF') and also updates the sales order quantity.
    The code works absolutely fine as long as the PGI date of the order item is either today or in the future. However if the PGI date of the order item is in the past. I get an error in the t_return table with error type 'E' saying 'PGI date is in the past hence could not update the item'.
    If I try to update the same order quantity in VA02 for the item with PGI date in the past it does so without any problem.
    Can someone please suggest what the problem might be. Or if there is some other way I can update the quantity. (I dont want to use BDC)
    FORM change_sales_order_item USING value(r_rtb_posnrs) TYPE zpsd_ztsdrtb_ro_track
                                 CHANGING r_return TYPE type_t_bapiret2.
      DATA: v_order_header_in TYPE bapisdh1,
      v_order_header_inx TYPE bapisdh1x,
      t_schedule_lines TYPE bapischdl OCCURS 0 WITH HEADER LINE,
      t_schedule_linesx TYPE bapischdlx OCCURS 0 WITH HEADER LINE,
      v_temp_rtb_vbeln TYPE vbeln,
      v_temp_rtb_posnr TYPE posnr,
      wa_old_rtb_posnrs TYPE ztsdrtb_ro_track,
      t_item_in TYPE bapisditm OCCURS 0 WITH HEADER LINE,
      t_item_inx TYPE bapisditmx OCCURS 0 WITH HEADER LINE,
      v_rtb_old_vbeln TYPE zrtbvbeln,
      v_rtb_old_posnr TYPE zrtbposnr,
      v_ro_old_vbeln TYPE zrovbeln,
      v_ro_old_posnr TYPE zroposnr,
      v_rtb_count TYPE i,
      v_next_row_index TYPE i,
      v_update_order_flg TYPE char1, "Update the sales order flag
      v_rtb_record_counter TYPE i,
      v_original_vbeln TYPE vbeln,
      t_bapiret TYPE STANDARD TABLE OF bapiret2.
      FIELD-SYMBOLS: <wa_r_rtb_posnrs> TYPE ztsdrtb_ro_track,
                     <wa_r_rtb_posnr_next> TYPE ztsdrtb_ro_track.
      CONSTANTS: c_updateflag TYPE bapisditmx-updateflag VALUE 'U'.
      v_order_header_inx-updateflag = 'U'.
    Get rid of the duplicate records for the same RTB order. Just use
    the last record quantity in the internal table
      LOOP AT r_rtb_posnrs ASSIGNING <wa_r_rtb_posnrs>.
        v_rtb_record_counter = v_rtb_record_counter + 1.
        <wa_r_rtb_posnrs>-seqnr = v_rtb_record_counter.
      ENDLOOP.
      SORT r_rtb_posnrs DESCENDING BY zrtbvbeln zrtbposnr seqnr zrtbconsumedflg.
      DELETE ADJACENT DUPLICATES FROM r_rtb_posnrs COMPARING zrtbvbeln zrtbposnr.
      DESCRIBE TABLE r_rtb_posnrs LINES v_rtb_count.
      v_rtb_record_counter = 0.
      v_update_order_flg = space.
      LOOP AT r_rtb_posnrs ASSIGNING <wa_r_rtb_posnrs>.
        v_rtb_record_counter = v_rtb_record_counter + 1.
        v_update_order_flg = space.
    Popluate the item quantity update flags for schedule lines
        t_schedule_linesx-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
        t_schedule_linesx-sched_line = '0001'.
        t_schedule_linesx-updateflag = c_updateflag.
        t_schedule_linesx-req_qty = 'X'.
        APPEND t_schedule_linesx.
        CLEAR t_schedule_linesx.
    *Item (Order QQuantity Field to be changed "KWMENG")
        t_schedule_lines-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
        t_schedule_lines-sched_line = '0001'.
        t_schedule_lines-req_qty = <wa_r_rtb_posnrs>-zrtbchgqty.
        APPEND t_schedule_lines.
        CLEAR t_schedule_lines.
    If fully consumed then set the rejection flag
        IF <wa_r_rtb_posnrs>-zrtbconsumedflg = 'X'.
          t_item_inx-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_inx-updateflag = 'X'.
          t_item_inx-reason_rej = 'X'.
          APPEND t_item_inx.
          CLEAR t_item_inx.
          t_item_in-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_in-reason_rej = 'ZF'.
          APPEND t_item_in.
          CLEAR t_item_in.
        ELSE.
          t_item_inx-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_inx-updateflag = 'X'.
          t_item_inx-reason_rej = 'X'.
          APPEND t_item_inx.
          CLEAR t_item_inx.
          t_item_in-itm_number = <wa_r_rtb_posnrs>-zrtbposnr.
          t_item_in-reason_rej = ' '.
          APPEND t_item_in.
          CLEAR t_item_in.
        ENDIF.
    If you have reached the last line of the RTB intern table update the sales order
    *Index pointing to the next row
        v_next_row_index = v_rtb_record_counter + 1.
        IF v_rtb_record_counter = v_rtb_count.
          v_update_order_flg = 'X'.
        ELSEIF v_rtb_record_counter < v_rtb_count.
    Get the next row data
          READ TABLE r_rtb_posnrs INDEX v_next_row_index ASSIGNING <wa_r_rtb_posnr_next>.
          IF sy-subrc = 0.
            IF <wa_r_rtb_posnrs>-zrtbvbeln <> <wa_r_rtb_posnr_next>-zrtbvbeln.
              v_update_order_flg = 'X'.
            ENDIF.
          ENDIF.
        ELSE.
          v_update_order_flg = space.
        ENDIF.
    update the rtb orders with quantities and the rejection flag (if required)
        IF v_update_order_flg = 'X'.
          CALL FUNCTION 'BAPI_SALESORDER_CHANGE' STARTING NEW TASK 'SOUPDATE'
            PERFORMING callbk_bapi_salesorder_change ON END OF TASK
            EXPORTING
              salesdocument    = <wa_r_rtb_posnrs>-zrtbvbeln
              order_header_in  = v_order_header_in
              order_header_inx = v_order_header_inx
            TABLES
              return           = t_return
              schedule_lines   = t_schedule_lines
              schedule_linesx  = t_schedule_linesx
              order_item_in    = t_item_in
              order_item_inx   = t_item_inx.
          WAIT UNTIL t_return[] IS NOT INITIAL.
          READ TABLE t_return INTO wa_return WITH KEY type = 'E'.
          IF sy-subrc <> 0.
          ELSE.
            r_return[] = t_return[].
            MESSAGE ID 'ZSD' TYPE 'E' NUMBER 613.
           RAISE errorinorderupdate.
          ENDIF.
          REFRESH t_schedule_linesx.
          REFRESH t_schedule_lines.
          REFRESH t_item_in.
          REFRESH t_item_inx.
          REFRESH t_return.
        ENDIF.
      ENDLOOP.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
       IMPORTING
         return = t_bapiret.
    ENDFORM.                    "Change_Sales_Order

    see the following example and try to do this:
    i_hdrx-updateflag = 'U'.
    *" Fill required SCHEDULE_LINES data.
    i_sched-itm_number = p_posnr.
    i_sched-sched_line = p_etenr.
    i_sched-req_qty = p_reqqty.
    i_schedx-updateflag = 'U'.
    i_schedx-itm_number = p_posnr.
    i_schedx-sched_line = p_etenr.
    i_schedx-req_qty = 'X'.
    APPEND i_sched.
    APPEND i_schedx.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = p_vbeln
    order_header_in = i_hdr
    order_header_inx = i_hdrx
    TABLES
    return = i_ret
    schedule_lines = i_sched
    schedule_linesx = i_schedx.

  • Is anybody else having a problem with Bluetooth functionality after iOS 7? I have lg tone Bluetooth headset that I use while working out, cutting the grass, etc. Before the update I could press the "next track", but anymore.... Help?! Please!!!!!!

    Is anybody else having a problem with Bluetooth functionality after iOS 7? I have lg tone Bluetooth headset that I use while working out, cutting the grass, etc. Before the update I could press the "next track", but anymore.... Help?! Please!!!!!!

    Tell Apple about it: http://www.apple.com/feedback/iphone.html
    Be sure to give as much detail as possible.
    I would also check LG's site.

  • Hello i have a problem with onfocus function on ipad. i am trying to bring my cursor on a text box on a button click. It works fine with safari web browser but not on ipad. Need a solution.

    Hello i have a problem with onfocus function on ipad. I am trying to bring my cursor on a text box on a button click. It works fine with safari web browser but not on ipad. Need a solution.

    I don't think that a software update from Apple will solve the issues that you are having. You have a rogue installation. After you posted I have just done the following:
    Disk Utility can verify  my partitioned Volume (including my boot disk) AND REPAIR the non-boot disks on the same Volume without a glitch. It repairs the non-boot disks containing data smoothly.
    I have used Mail to send some mails from some Yahoo and Hotmail accounts to my Thunderbird client containing GMail accounts - absolutely normal.
    I have iLife '09 but my iMovie '09 and iPhoto '09 open in a jiffy and I see no issues here. I have 6GB RAM (Maximum) on an early 2008 Macbook Pro with a 750GB hard drive partitioned with 120GB reserved for the Boot Drive.
    I am sorry that I cannot help further but I am sure there must be a way to reinstall the software without having to revert to restoring your ML backup. I have two clones and if you have such I would attempt to do that through that rather than through Time Machine - that is of course if you have a cloned drive.
    Good luck!

  • Is that important column order in a query with row_number function

    Hi folks,
    I am using Oracle 11g R2 on HP-UX machine.
    I have 2 types of query with row_number and I think they are same but output of each of them are different. I changed only column order in query2.
    Query 1 :
    (SELECT
    "LOOKUP_INPUT_SUBQUERY"."CONTRACT_SK" "CONTRACT_SK",
    "LOOKUP_INPUT_SUBQUERY"."SIMCARD_SK" "SIMCARD_SK"
    FROM (
    SELECT row_number ()
    OVER (
    PARTITION BY "R_CON_SUBS_SIMCARD_LK".
    "CONTRACT_SK"
    ORDER BY
    "R_CON_SUBS_SIMCARD_LK"."START_DATE" DESC,
    "R_CON_SUBS_SIMCARD_LK"."SEQ_NUM" DESC NULLS LAST) /* EXPRESSION_3.OUTGRP1.SIRA */
    "SIRA",
    "R_CON_SUBS_SIMCARD_LK"."CONTRACT_SK" "CONTRACT_SK",
    "R_CON_SUBS_SIMCARD_LK"."SIMCARD_SK" "SIMCARD_SK"
    FROM "SRC_OZRDS"."R_CON_SUBS_SIMCARD_LK" "R_CON_SUBS_SIMCARD_LK")
    "LOOKUP_INPUT_SUBQUERY"
    WHERE ("LOOKUP_INPUT_SUBQUERY"."SIRA" = 1))
    Output of this like that :
    CONTRACT_SK SIMCARD_SK
    1     1
    1     3
    1     4
    1     5
    1     6
    1     11
    1     12
    1     14
    1     15
    1     16
    Query 2 :
    (SELECT
    "LOOKUP_INPUT_SUBQUERY"."CONTRACT_SK" "CONTRACT_SK",
    "LOOKUP_INPUT_SUBQUERY"."SIMCARD_SK" "SIMCARD_SK"
    FROM (
    SELECT
    "R_CON_SUBS_SIMCARD_LK"."CONTRACT_SK" "CONTRACT_SK",
    "R_CON_SUBS_SIMCARD_LK"."SIMCARD_SK" "SIMCARD_SK",
    row_number ()
    OVER (
    PARTITION BY "R_CON_SUBS_SIMCARD_LK".
    "CONTRACT_SK"
    ORDER BY
    "R_CON_SUBS_SIMCARD_LK"."START_DATE" DESC,
    "R_CON_SUBS_SIMCARD_LK"."SEQ_NUM" DESC NULLS LAST) /* EXPRESSION_3.OUTGRP1.SIRA */
    "SIRA"
    FROM "SRC_OZRDS"."R_CON_SUBS_SIMCARD_LK" "R_CON_SUBS_SIMCARD_LK")
    "LOOKUP_INPUT_SUBQUERY"
    WHERE ("LOOKUP_INPUT_SUBQUERY"."SIRA" = 1))
    Output of this like that:
    2     874812
    7     70097256
    8     18734091
    9     158024
    10     815397739
    13     22657919
    19     83177779
    20     82579529
    22     5829949
    23     35348926
    25     3865978
    I expected the second output, because there are lots of contract sk but there is one contract_sk in first query result. i did not get the point. What is the problem ?

    user8649469 wrote:
    I changed only column order in query2.So what else do you expect? If you order, for example, by last name, fist name don't you think rows will be returned in a different order (and therefore same row will have different row number) than ordering by first name, last name?
    SY.

  • Problem with todate function in OBIEE.

    Hi,
    I have some data mismatch while using todate function. There is a measure GWP, and two logical columns MTD and YTD. MTD is todate(GWP, fiscal_month) and YTD is todate(GWP, fiscal_year). whereas sometimes MTD is displaying data and YTD doesn't. Probably it has to display, what is a problem with this? Can anyone help me out!!!
    Thanks,
    Anitha.B

    Hi,
    Thanks for your response.
    The requirement is, there is a date filter and measure GWP(sum) and when selecting a date it should ensure the following.
    1. Daily - GWP of the selected date
    2. MTD - GWP from first day of the selected month upto the selected date.
    3. YTD - GWP from the first day of the financial year of the date to the selected date.
    So created a time dimensional hierarchy fiscal_year, fiscal_month and date_time,date_key(chronological key).
    created a filter as
    date_time is equal to the date filter
    MTD - todate(gwp,fiscal_month)
    YTD - todate(gwp,fiscal_year)
    There is a discrepency in the result in which sometimes am getting the value for MTD and not for YTD like
    22/11/1986
    Product Daily MTD YTD
    A 0 100 0
    B 0 200 300
    C 0 350 0
    It may not be a problem with the data , then where am I doing mistake? help me.
    Thanks,
    Anitha.B

  • Problems with the function DBMS_XMLSCHEMA.copyEvolve

    I´m having problems with the evolution of xml-schema.
    First the function DBMS_XMLSCHEMA.copyEvolve works correctly, but since one week I get only errors. Strangely is the fact that I use the same files (xml-schema, xslt and xml instances) and the same SQL-Code. Even if I delete all tables, directories, ... with the drop instruction and create them again, I get only error messages. It is also strangely that the function DBMS_XMLSCHEMA.copyEvolve not works if the old and new xml-schema are identical and no XSLT-Stylesheet is handed over. Can by the function DBMS_XMLSCHEMA.copyEvolve something going wrong in the database ? Do I must recreate the database, and how can I do that by the XE? But that can not be a good solution.
    Has anybody a idea what can I do?
    Here is my error report:
    Error starting at line 1 in command:
    BEGIN
    DBMS_XMLSCHEMA.copyEvolve(
    schemaURLs => xdb$string_list_t('http://localhost:8080/internal/xmlschema/testschema.xsd'),
    newSchemas => XMLSequenceType(XDBURIType('/public/testschema_evolution.xsd').getXML()),
    transforms => XMLSequenceType(XDBURIType('/public/MapTotestschema_evolution.xslt').getXML()));
    END;
    Error report:
    ORA-30944: Fehler beim Rollback für XML-Schema "http://localhost:8080/internal/xmlschema/testschema.xsd" Tabelle "MYUSER"."XMLSCHEMATABELLE" Spalte ""
    ORA-02304: Ungültiges Objektidentifizierungsliteral
    ORA-30942: Fehler bei XML Schema Evolution für Schema "http://localhost:8080/internal/xmlschema/testschema.xsd" Tabelle <n/a> Spalte ""
    ORA-31088: Objekt "MYUSER"."BIN$QNQjNoYiRfC4KlQtnfUpMw==$0" hängt von Schema ab
    ORA-06512: in "XDB.DBMS_XMLSCHEMA_INT", Zeile 113
    ORA-06512: in "XDB.DBMS_XMLSCHEMA", Zeile 210
    ORA-06512: in Zeile 2
    Thanks David

    Can you try doing the following before running copyEvolve
    SQL> purge recyclebin
      2  /
    Recyclebin purged.
    SQL> alter session set recyclebin =  off
      2  /
    Session altered.
    SQL>and see if it works as expected.

  • Problem with SO_DOCUMENT_SEND_API1 Function module

    Hi Experts,
    Is it anyway possible that If we are sending excel attachment through email using SO_DOCUMENT_SEND_API1, column width in excel get adjusted as per the field content without any manual interaction.
    Looking forward towards your valuable suggestions!!!
    Regards
    VJ

    hi,
    please see the following
    [alignment problem with SO_NEW_DOCUMENT_SEND_API1 FM;
    [Problem with function module SO_NEW_DOCUMENT_SEND_API1;
    hope these helps you
    Regards
    Ritesh

  • Problem with translate function (C++ parser v9)?

    When upgrading to v9 of the C++ parser, we notice a problem with the translate function within xsl stylesheets. Take the following snippet :-
    <StartDt><xsl:value-of select="translate(string(CheckInDate),'-','')"/></StartDt>
    Previously, this statement would strip the '-' chars from our input dates of the form 2002-05-02 to give 20020502. It now does not replace the '-' chars which causes our transformed output to be invalid. We have many developed and tested xsl's which now don't work.
    When we revert to v8, the same xsl's work correctly.
    This happens on all platforms (Windows/Linux/Solaris).
    Anyone else noticed this?
    Regards,
    Mike

    It worked for me as well.
    Use DUMP to find out the char code used for é and ú and try to replace these character codes.
    On my system it is 130 and 163
    SELECT TRANSLATE('héllú wúrld', 'éú', 'eu'),
           dump('héllú wúrld'),
           TRANSLATE('héllú wúrld', chr(130)||chr(163), 'eu')
    FROM   dual;
    hellu wurld
    Typ=96 Len=11: 104,130,108,108,163,32,119,163,114,108,100
    hellu wurld

  • Problems with planning function in Web Application Designer in 2004s

    Hi All,
    I have a problem in WAD 2004s with planning function. I created a web template that includes a query. It runs on the enterprise portal, and I can edit this query. The problem is: I don't know how to save this edited query, because when I use the button with function save, the new value doesn't appear in the relevant info cube.
    Anybody can help me how to save the new values to the info cube?
    Thanks in advance
    Dezso Toth

    I don't know if you ever resolved this, but you may just ned to change a setting on your query properties.  When data is entered into planning layouts and saved, that data is put into a "yellow" request in the underlying infocube. 
    Until the necessary volume of data is posted which causes this to change to "green", it remains yellow.  Note that this request could also be changed to green several ways.  i.e. manually, by flipping the "real-time infocube behavior" switch, etc. 
    Anyway, as long as it "yellow" your query, by default will not consider it, unless you change it's properties to tell it to consider "yellow" requests.  This can be done via RSRT and pressing the "properties" button.  Choose request status "2" and your problem should be solved

Maybe you are looking for