Order by rDate desc is not working

Hello,
order by rDate desc is not working in my following query
select cv_id,to_char(rDate,'Month dd, yyyy') from jobResponses 
where job_id=35 and (responseStatus=1 OR responseStatus=2) order by rDate desc
March     03, 2012
March     03, 2012
March     04, 0012Thanks in anitcipation

Christy H. wrote:
order by rDate desc is not working in my following queryWell, it works just fine. Last rDate year is 0012, that's why it is the last one. It looks like table data wasn't loaded correctly and you ended up having rows with year 12 instead of 2012. Check table data.
SY.

Similar Messages

  • Order by in MATERIALIZED VIEW not work successfully with first column (ID)

    Dears,
    I am trying to create a Materialized View as below:
    CREATE MATERIALIZED VIEW HR.MV_EMP
    PCTFREE 10
    MAXTRANS 255
    TABLESPACE users
    STORAGE (
    INITIAL 65536
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    BUILD IMMEDIATE
    REFRESH ON DEMAND
    AS
    SELECT *
    FROM employees
    where rownum < 5000 order by employee_id desc ;But while querying the MATERIALIZED VIEW, it did not work successfully as the data did not appear in the accurate order.
    I tried to create the same MATERIALIZED VIEW but order by another column (Column Date), it worked successfully and the data appeared in the accurate order.
    It means that MATERIALIZED VIEW not work successfully with the first column (id).
    Can you please help me in this ?
    Thanks & regards,,

    A few pointers :
    1. As has been pointed out, the ROWNUM has been incorrectly placed. ROWNUM values are assigned as rows are fetched from the source before the ORDER BY. You need to ORDER BY first (in a SubQuery) and then ROWNUM afterwards (outside the SubQuery).
    2. I wonder why you want only the last 5000 EMPLOYEE_IDs. What if Employee_ID 1 is still an active employee (he is the founder, first employee and CEO ?). There could be very many "low" EMPLOYEE_IDs that are still active.
    3. Logically I would expect some filter other than the ROWNUM ... ORDER BY to be used to select candidate rows. Then, an ORDER BY in the CREATE query would be unnecessary.
    4. When querying the Materialized View you must explicitly ORDER BY (irrespective of whether you did or did not do an ORDER BY in the CREATE ...)
    5. How do you expect to refresh the MV ? Will it always be a COMPLETE Refresh ? Remember that your "5000 employees" filter would likely exclude older employees at the next refresh. If you use some other filter, it should be consistent across all refreshs.
    Hemant K Chitale

  • Service order on CRM application is not working fine

    1. We have recently moved from 8.48.16 to 8.51.15 on CRM 8.8 .
    2. One of the deleivered feature on CRMUPG is not working. Navigation is as given below.
    a) http://mstn-v-iscdev2/psp/CRMUPG/?cmd=login
    b) click on " service order " on left hand side.
    c) Enter service order id (2000136) in Service Order id.
    d) click on " Insert IOP Facilities " in requested facilities section.
    e) After clicking CSOS link in facilities column on IOP Facility pane.
    The CSOS data is not reflecting in requested Facilities section.
    Plz check the issue and help the earliest.
    Details :- IE 8
    In Another environment,when i click on CSOS.
    I can see javascript:submitAction_win0(document.win0,'MSI_FACILITYNAM$0'); in below panel.
    while in the environment where i am facing issue show
    javascript:hAction_win0(document.win0,'MSI_FACILITYNAM$0', 0, 0, 'CSOS', false, true);

    Hi,
      How have you defined the property "WAS host" for the portal system that you have created for the back-end?
    You might get this error if the way you have defined this WAS host property and the way you are calling the portal are different. For example, if your WAS host property is "<hostname>:<portnumber>" and you are calling your portal as "localhost:<portnumber>", then you will get this error.
      Also are you connecting to your portal using the fully qualified domain name? Don't call the portal simply as
    <i>http://<host>:<port>/irj</i> but call it as http://<host>.<domain>:<port>/irj.
    Regards,
    Satyajit.

  • Why does DESC Index not work?

    SQL> CREATE TABLE test_1
      2  AS
      3  SELECT  *
      4  FROM    all_objects
      5  ;
    Tabelle wurde angelegt.
    SQL> CREATE TABLE test_2
      2  AS
      3  SELECT  DISTINCT
      4          object_type
      5  FROM    test_1
      6  ;
    Tabelle wurde angelegt.
    SQL> CREATE INDEX idx_1
      2  ON test_1
      3  (   object_type,
      4      created DESC
      5  );
    Index wurde angelegt.
    SQL> CREATE UNIQUE INDEX idx_2
      2  ON test_2
      3  (   object_type
      4  );
    Index wurde angelegt.
    SQL> BEGIN
      2      dbms_stats.gather_table_stats( ownname => USER,tabname => 'TEST_1',cascade => TRUE);
      3      dbms_stats.gather_table_stats( ownname => USER,tabname => 'TEST_2',cascade => TRUE);
      4  END;
      5  /
    PL/SQL-Prozedur wurde erfolgreich abgeschlossen.
    SQL> SET AUTOTRACE TRACEONLY
    SQL> SELECT  created
      2  FROM    test_1
      3  WHERE   object_type = 'TABLE'
      4  ORDER BY 1 DESC
      5  ;
    Ausführungsplan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=3 Card=2368 Bytes=42624)
       1    0   INDEX (RANGE SCAN) OF 'IDX_1' (INDEX) (Cost=3 Card=2368 Bytes=42624)Ok, here the DESC Order of the created column in the Index will be used. We have no SORT Operation in the execution plan.
    But why can't the CBO use the DESC order of the column in this Query? Here we have a SORT operation:
    SQL> SELECT  created
      2  FROM    test_1
      3  WHERE   object_type = ( SELECT object_type FROM test_2 WHERE object_type = 'TABLE' )
      4  ORDER BY 1 DESC
      5  ;
    Ausführungsplan
       0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=5 Card=2368 Bytes=42624)
       1    0   SORT (ORDER BY) (Cost=5 Card=2368 Bytes=42624)
       2    1     INDEX (RANGE SCAN) OF 'IDX_1' (INDEX) (Cost=3 Card=2368 Bytes=42624)
       3    2       INDEX (UNIQUE SCAN) OF 'IDX_2' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=9)Edited by: Rumburak on Jul 28, 2009 4:36 PM

    I guess it will not sort in case of single value as opposed to select from the table subquery expecting multiple rows and has to sort for the final result.
    SQL> SELECT     created FROM    test_1
      2     WHERE   object_type = ( SELECT object_type FROM test_2 WHERE object_type = 'TABLE' )
      3     ORDER BY 1 DESC
      4  /
    1691 rows selected.
    Execution Plan
    Plan hash value: 3925931507
    | Id  | Operation           | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |        |  1731 | 29427 |    12   (9)| 00:00:01 |
    |   1 |  SORT ORDER BY      |        |  1731 | 29427 |    12   (9)| 00:00:01 |
    |*  2 |   INDEX RANGE SCAN  | IDX_1  |  1731 | 29427 |     8   (0)| 00:00:01 |
    |*  3 |    TABLE ACCESS FULL| TEST_2 |     1 |     9 |     3   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("OBJECT_TYPE"= (SELECT /*+ */ "OBJECT_TYPE" FROM "TEST_2"
                  "TEST_2" WHERE "OBJECT_TYPE"='TABLE'))
       3 - filter("OBJECT_TYPE"='TABLE')
    Statistics
              1  recursive calls
              0  db block gets
             11  consistent gets
              0  physical reads
              0  redo size
          30268  bytes sent via SQL*Net to client
           1613  bytes received via SQL*Net from client
            114  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
           1691  rows processed
    SQL> SELECT     created FROM    test_1
      2     WHERE   object_type = 'TABLE'
      3     ORDER BY 1 DESC
      4  /
    1691 rows selected.
    Execution Plan
    Plan hash value: 3428004586
    | Id  | Operation        | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT |       |  1731 | 29427 |     8   (0)| 00:00:01 |
    |*  1 |  INDEX RANGE SCAN| IDX_1 |  1731 | 29427 |     8   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - access("OBJECT_TYPE"='TABLE')
           filter("OBJECT_TYPE"='TABLE')
    Statistics
              1  recursive calls
              0  db block gets
            121  consistent gets
              0  physical reads
              0  redo size
          30268  bytes sent via SQL*Net to client
           1613  bytes received via SQL*Net from client
            114  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
           1691  rows processedSS

  • I'm working on CC 2014 on a mobile version of a site, having trouble with order of layers and links not working.

    I'm working on CC 2014 on a mobile version of a site, my links on layers that are below the top layer (call menu) are not working. If I move the layers above the menu layers the links work, but then the menu appears under the graphic and other elements on the site.

    I'm having this issue right now. I would LOVE some help. Did you get it figured out?

  • Change order of key figure is not working in Web report output (using WAD)

    Hi,
    We are using BI 7.0, release 701 and level 008. We are facing problem in WAD (web report output). When ever we do 'Select filter' for key figures and 'change the order' of key figures, it does not get reflected in new order. Though drag and drop of key figures is working.
    Though same change order is working fine in Bex Analyser.
    Kindly suggest some inputs.
    Thanks.

    Hi,
    On Which Service Pack are you on?WAD has this feature of re arranging the keyfigures in BI 7.0 for SPS 14...
    Regards,
    Bhagyarekha.

  • Ordering a calendar in UK, not working, or is it me?

    Hello,
    I'm trying to order a calendar that I've designed in iPhoto. The order button is greyed out, so I can't press order. I have "one-click ordering" enabled, but do I also need a .mac account? Or is this service not available in the uk?
    Thanks
    D

    I managed to order a pair of Calendars on the 17th...
    Order status was shipped, but with no confirmation email until 23rd. it says I have to expect 7-9 days from receipt of email for delivery, so possibly 1st of February....
    So at least then it worked - are you getting the same grayed out button on books?

  • Order by most recent date not working in CAML Query

    Hi,
    I am trying to pull items from an announcements list and I would like the results sorted by most recent first, but it is coming back as least recent first. Can someone tell me what is wrong with the query? I even tried "Modified" and I get the
    same result. Thanks.
             SPList oList  = SPContext.Current.Site.OpenWeb("ts/hse").Lists["near misses"];
               SPQuery spQuery = new SPQuery();
               spQuery.Query = "<Query><OrderBy><FieldRef Name='Created' Type='DateTime' IncludeTimeValue='TRUE'  Ascending='False' /></OrderBy></Query>";
               spQuery.RowLimit = 3;
               SPListItemCollection spListItemCollection = oList.GetItems(spQuery);
    Sherazad

    Hi,
    I did a test in my environment as the capture below. It works properly.
    I suggest you try the code in another list and test whether it works.
    Feel free to reply with the test result.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • DONE button is not working in Oracle Configuration page in Order Management

    Hi,
    We are in 11.5.10.2 application, In order managemnt DONE button is not working. Once we choose all the options and click on DONE button the configuration page is not closed.
    Please help us to come out ot this problem.
    Thanks
    Krishna

    Hi,
    We are in 11.5.10.2 application, In order managemnt DONE button is not working. Once we choose all the options and click on DONE button the configuration page is not closed.
    Please help us to come out ot this problem.
    Thanks
    Krishna

  • Shuffle not working properly

    My Itunes library is not working properly. The main problem is the shuffle function. Clicking the shuffle icon to turn it blue and shuffle the play order of the songs does not work. If I sort by name, some of the songs are shuffled where as others will play one after the other (all the tracks in an album).
    Also, the start and stop times no longer work, nor does the volume adjustment.
    Uninstalling and reinstalling does not fix the problem.
    Any ideas?

    Possible Cause:
    It sounds like the affected songs are encoded in a format that the iPod shuffle cannot read. Here is a knowledge base article that list the compatible formats:
    http://docs.info.apple.com/article.html?artnum=300464
    Troubleshoot:
    To check the format of a song, right click it, and select Get Info. A window will come up giving details like, Kind, Size, Bit Rate.
    It seems there are multiple songs with this problem so it may be quicker to add a new column to your Song list that will show 'Kind' Follow:
    http://docs.info.apple.com/article.html?artnum=165165
    For instructions on how to do this.
    Solution:
    If this is the case, then I would suggest saving a copy of the song to a compatible format. Instructions for doing this can be found at:
    http://docs.info.apple.com/article.html?artnum=165172
    Note: You are saving a COPY of the song. It does not convert the song, but duplicates the song and the converts the duplicate. So if you do not wish to keep the original (incompatible formated) song then I would suggest deleting it, so you don't get the two songs confused.

  • Anyone else get a presale reservation that did not work?

    I was on apple.com & AT&T at 11:55 pm and refreshed for around 15 minutes..both sites were still down.
    Googled iPhone 5 to see what others were saying and all said to order on my iPhone..which I did. Email stated I had a reservation and weould receive and email to complete my order. Got the email at around 2am. Clicked on the complete order and the phone I picked came up...black/slate 32gb, so far so good...then when I clicked on the order it woudl not go through. The email stted I had till 5pm the 15th so I kept trying and still nothing. Called 1-800-MY-APPLE and they said the site may be down so keep trying...which I did all the way up to 5pm Saturday the 15th.
    I called Apple back and got the run around several times. I finally got a hold of a guy that seemed to help. He said he was going to call his boss and see what he could/should do and call me back. He called about 20 min later and said to cancel the one and reorder, which we did. His boss put in a note to expedite the order to still arrive the 21st and I should receive a confirmation email by Monday. No such email...still says Oct 10-16!!!
    I did get an email with my web order number to accept the terms so that my order could be completed. That too did not work...kept sayimg it could not connect or was not found. A few hours later I received the same email but with the order number and it did not work. Called Apple and they got it to work. She also said she saw the note stating to expedite but could not tell me if it was going to happen ( which I understand )
    I know there is no way this thing ships to arrive the 21st since it is now the 18th and not even completely processed...I wish I could call and just have them call one of THEIR stores and put one on reserve for me with my original number to pick up Friday. I know, I know...who do I think I am lol...I think I am someone that wet through several channels to order a product on time and should be taken care of...it is ridiculous that I have to keep calling to check to see when I can get the phone I ordered on time....
    I still love apple products and I know they take care of people...not every transaction is going to go smooth...just seems it was an easy fix. And I like my solution ( pick up at apple )

    Hi David,
    This URL works: http://tourdelc.adobe.com/content/Services/RightsManagement/RightsManagement/ApplyPolicy/M arket%20Analysis%20[RM].pdf
    Marc.

  • Price analysis in webshop not working

    Hi,
    Our requirement is to display price analysis in an internal webshop as the business would like to understand how pricing is working.
    I have set the enable.pricing parameter in XCM to 'true'. We made the following changes in the web.xml --
    <context-param>
       <param-name> priceAnalysis.isa.sapmarkets.com</param.name>
       <param-value>true</param-value>
    I also added the prc_trace parameter to the user parameters.
    One old SAP note had mentioned changes to 2 parameters (priceAnalysis and enable.Price). When we made this change to the web.xml, we were able to see the price analysis in the product catalog (in the form of a hyperlink on the price in the page that gets displayed when one drills down in to the product hyperlink).
    However the price analysis in the shopping basket or the order (in edit mode) is not working.
    Does anyone have any ideas on what we might have missed?
    Any helpful replies would be appreciated.
    thanks

    Hi Easwar,
    we initially made the change only to the UI component through XCM. After a server bounce, no changes were seen on the webshop.
    Then we added the code as per the old SAP note (which mentioned changes to 2 parameters). Price analysis started working for the product catalog after re-starting the server in visual admin. It was still not working at the shopping basket/order level.
    This was the code --
    <context-param>
    <param-name>enable.priceAnalysis.isa.sapmarkets.com</param-name>
    <param-value>true</param-value>
    <description>Turn on IPC price analysis</description>
    </context-param>
    <context-param>
    <param-name>priceAnalysis.isa.sapmarkets.com</param-name>
    <param-value>true</param-value>
    <description>Turn on IPC price analysis</description>
    </context-param>
    We then tried commenting the first part but this made no changes. Commenting the entire code again has resulted in no hyperlink on the price of products in the product catalog.
    regards,
    Jaya

  • MN04 not working for free text PO

    Hi All,
    I have maintained a condition record through MN04 in purchase organisation, company code and vendor combination. This condition record is working fine for regular purchase orders. But it is not working for free text PO's. Could you please guide me why is it so?
    I am maintaining same purchase organisation, company code and vendor combination for free text PO also. Question is why it is working for a purchase order with material inside it and why it is not working for purchase order with out material.
    Thank you all in advance

    Hi,
       Seems you are using a custom print program and form. I would suggest to change the program to SAPFM06P, form routine as "ENTRY_NEU" and the form as "MEDRUCK" in NACE transaction for the output type and check the scenario again. Also cross check the settings with the KBA: 1829682 - Output type is not determined in Purchase order
       If its getting triggered, then check the custom program and the form with the help of technical team.
    Regards,
    AKPT

  • Order by desc or asc is not working with rownum

    SQL> desc offer
    Name                                      Null?    Type
    OFFER_ID                                  NOT NULL NUMBER(14)
    DOMAIN_ID                                          NUMBER(14)
    OFFERDATE                                          TIMESTAMP(0)
    CONTACTPERSON                                      VARCHAR2(36)
    EMAIL                                              VARCHAR2(50)
    TEL                                                VARCHAR2(23)
    CATEGORY                                           NUMBER(2)
    AMOUNT                                             NUMBER(5)
    STATUS                                             NUMBER(2)
    SQL> ed
    Wrote file afiedt.buf
      1  select to_char(offerdate,'dd-Mon-yyyy'),
      2     offer_id,
      3     amount
      4  from
      5     offer
      6  where
      7     domain_id=1
      8     and amount is not null
      9* order by offerdate desc
    SQL> /
    TO_CHAR(OFF   OFFER_ID     AMOUNT
    27-Apr-2010          4         55
    26-Apr-2010          5         45
    26-Apr-2010          3         50
    26-Apr-2010          2         45
    /*****These may be Ten thousand rows*****/When am adding rownum<2 order by asc or desc in my query then it is not working.
    SQL> ed
    Wrote file afiedt.buf
      1  select to_char(offerdate,'dd-Mon-yyyy'),
      2     offer_id,
      3     amount
      4  from
      5     offer
      6  where
      7     domain_id=1
      8     and amount is not null
      9  and
    10     rownum<2
    11* order by offerdate desc
    SQL> /
    TO_CHAR(OFF   OFFER_ID     AMOUNT
    26-Apr-2010          5         45
    SQL> ed
    Wrote file afiedt.buf
      1  select to_char(offerdate,'dd-Mon-yyyy'),
      2     offer_id,
      3     amount
      4  from
      5     offer
      6  where
      7     domain_id=1
      8     and amount is not null
      9  and
    10     rownum<2
    11* order by offerdate asc
    SQL> /
    TO_CHAR(OFF   OFFER_ID     AMOUNT
    26-Apr-2010          5         45I want to simply display one latest record from DB offerDate wise
    Thanks in anticipation

    Try this
    select to_char(offerdate,'dd-Mon-yyyy'),
           offer_id,
           amount
        from(
        select to_char(offerdate,'dd-Mon-yyyy'),
           offer_id,
           amount
        from
           offer
        where
           domain_id=1
           and amount is not null
           order by offerdate asc)
    where  rownum<2Edited by: user12984479 on Apr 27, 2010 4:34 AM

  • Copied layout is not working for Sales order item assinment block

    Hi Experts,
    I copied the standard componet BT115IT_SLS/items view layout  with custom role configuration key and worked fine.
    I have added one more field to the item view  with the same configuration and saved .When I opended the sales order in the WEB UI , The item assigment block is displaying with complete  BTADMINI context fileds and This is the issue.
    I have seen configured fields only in  the personalization and I have downloaded the items assigment block data to Execl.In the Execl sheet I can able to see the configured fields (availble fileds in the configuration tab in component workbemch) data only.
    But Items assignment block is displaying all the fileds (taking  from the context node BTADMINI).
    I have deleted existing customer configuration and again copied  from the standard layout.But I got the same issue.
    I have wriiten some code in the ON_NEW_FOCUS and commented the code.Still it not working.
    Please help me , where I have done the mistake and provide me some inputs.
    Thanks,
    Venkky

    Hi Experts,
    Solved isuues myself.
    The problem is inconsistency of BTAdminI context node . I have deleted the view enhancement and again enhanced the view .I copied the layout with customer role key and dispalyed expected layout.
    Thanks,
    Venkky

Maybe you are looking for

  • How do I fix these hyperlink problems?

    Hello all, Here's my situation. I'm a copywriter at an ad agency and I just published a site in iWeb to showcase my work. This is my site: http://web.mac.com/rp173/iWeb/Site/landing.html These are the type of hyperlinks I'm having problems with: A te

  • File adapter and clustered application

    Hi ! I have a question about how to use correctly file adpter at sca application in clustered server. My application very simple. Folder with xml files. Composite application - file adapter read folder with mask *.xml. Some times file adapter read on

  • Approval Stages- Marketing Documents

    Dear All I am working on SAP Business One 8.81 PL 06 and SAP Business One 8.82 PL00 (Test Enviroment) In both the version approval process is not working . I defined Approval stages, Template and condition as Always. Please let me know is there any c

  • How to delete/remove the software component from integration repository

    Dear All How to delete/remove the software component from integration repository which we have created some Data and message types. Regards Blue

  • Wanting to upgrade from OS X 10.3.9 to Mac OS X 10.4.6

    My question is - Does Mac OS X 10.4.6 still support/run OS 9 programs?