View and order by

Hi,
I am working on oracle 10G.
i've read that we can't use order by clause with a view query.
but in 10G i am able to do this.
please tell me its oracle 10g's new feature or i have a misconception ?
thanks

SQL> create table t
  2  (x int)
  3  /
Table created.
SQL> create view vw
  2  as
  3  select *
  4    from t
  5   order by x
  6  /
View created.
SQL> select *
  2    from v$version
  3  /
BANNER
Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
PL/SQL Release 9.2.0.7.0 - Production
CORE    9.2.0.7.0       Production
TNS for IBM/AIX RISC System/6000: Version 9.2.0.7.0 - Production
NLSRTL Version 9.2.0.7.0 - Production
SQL>

Similar Messages

  • Materialized view and Order by clause

    Hi all. I'd like to have some information regarding the order by clause used in a materialized view.
    I'm using Oracle 9.2 and Win2003 server. I have a common view (my_common_view) on which a materialized view is based (my_materialized_view). Materialized view is built for fast refresh and is created in this way:
    create materialized view my_materialized_view as
    select * from my_common_view
    order by 1,2,3;
    My question is: if I query this materialized view without adding an order by clause in the statement, I will obtain always an ordered result set? So, is it useful to include the order by clause in the materialized view script or the order by has to be include in the statement used for quering the materialized view (for example like this: select * from my_materialized view order by ...)?
    Thank you very much.
    Ste.

    SQL> create table t
      2  (x int)
      3  /
    Table created.
    SQL> create view vw
      2  as
      3  select *
      4    from t
      5   order by x
      6  /
    View created.
    SQL> select *
      2    from v$version
      3  /
    BANNER
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    PL/SQL Release 9.2.0.7.0 - Production
    CORE    9.2.0.7.0       Production
    TNS for IBM/AIX RISC System/6000: Version 9.2.0.7.0 - Production
    NLSRTL Version 9.2.0.7.0 - Production
    SQL>

  • [SQL] inline view and order by on oracle 8.0.5

    Hi everyone.
    I am trying to sort data inside "inline view"
    on "Oracle8 Release 8.0.5.0.0 - Production".
    However, it did not work. Is this an oracle-bug?
    I got the oracle error , "ORA-00907".
    The sql script is like this:
    select ..............
    from (select ..... from .. where .... order by ...)
    where rownum <11
    However, the "exactly" same sql has no problem
    on "Oracle8i Enterprise Edition Release 8.1.7.0.0".
    Every response will be greatly appreciated.
    Thanks in advance.
    Ho.

    Order by cannot be used in a subquery while for inline view it is supported but in Oracle8i, release 8.1 and up
    Khurram

  • Userexit to Restrict the VIEW and MODIFY of the Sales Order

    Hello Everybody,
    I need to do the following task.
    I want to restrict to VIEW and MODIFY the sales order for particular sales office or sales group.
    I need  user exit for that.
    Please help me by providing brief information.
    Thanks
    M Rahman

    Hi Rahman
    Instead of changing the DISPLAY and CHANGE status of Sales Order,
    i think it would be better if u make a check at the time of SAVE.
    When the SO is being saved in VA02,check the sales office or sales group
    and then give a error message to the user, saying that he is not authorised to make changes to the
    SO for this particular sales office or sales group.
    For this you can use the inckude MV45AFZZ,and USER EXIT userexit_save_document.
    Sample Code:
    IF SALES_OFFICE EQ 'XYZ'.
    MESSAGE 'Change not possible for this Sales Office' type 'E'.
    ENDIF.
    Regards
    Hareesh Menon

  • Report for viewing Sales order no against delivery date & actual GI date

    Hi Experts,
    Is there any report for viewing Sales order no against delivery date & *actual GI date*
    Because in VL06F , i can only able to get planned GI.
    Please guide regarding the same where i can get 'ACTUAL GI DATE ' against above combination .
    Regards,
    Sujit S.

    dear Hrishi,
    i followed your suggestion, but couldn't get desired results,
    here i can get planned GI date, where i wanted to get Actual GI date for complted deliveries,
    thanks for your valuable reply.
    @ G. Lakshmipathi ;-
    i think i will need to develop z-report for fetching the data from the tables
    VBAK (to get sale order reference) and
    LIKP (to get delivery and actual GI date)
    thanks for your reply,
    Regards,
    Sujit

  • I am working in photshop elements 13 organizer, album view, and would like to resequence (rearrange) the photos shown in the album but am unable to do so.  My understanding is that you can click on the phots that you want to move and drag it to a new loca

    I am working in photshop elements 13 organizer, album view, and would like to resequence (rearrange) the photos shown in the album but am unable to do so.  My understanding is that you can click on the phots that you want to move and drag it to a new location within the same album.  After i select the photo that I want to move and click on the photo, I get a cirlcle with a diagonal throught it and am unable to drag the photo to its new location.  What am I doing wrong?  I know this should be a simple thing to do.  Thanks

    Jimmy RG
    In the Elements Organizer 13
    The key to all this is to click on/select/highlight the Album that you have created in Local Albums.
    Then make sure that the Sort By: (in the row below the highlighted "Media" header is set for Album Order.
    You should see a number at the top left of each of thumbnails.
    Then, click on the thumbnail that you want to move, hold down the click, and drag the thumbnail to the wanted new location
    in the line up of thumbnails.
    Often I had to press down hard on the drag.
    Please let us know if that worked for you.
    Also, in Edit Menu/Preferences/Keyword Tags and Albums/Enable Manual Sorting Options, I set all for manual.
    ATR

  • In Lightroom 3 I am in Library mode in the Grid View and need to rearrange images, but it is not allowing me to move them.

    In Lightroom 3 I am in Library mode in the Grid View and need to rearrange images, but it is not allowing me to move them.

    I don't do a lot of dragging to custom arrange my images. But the custom order is right at the bottom of the list of sort orders on my computer.
    Added later: But don't worry about the custom order. It doesn't make any difference on my system. Are you sure you are dragging the image itself, and not the border around the image?

  • Problem in tabular form based on dynamic view and pagination

    Hi All,
    I have a manual tabular form based on a dynamic view. The view fetches the records based on search criteria given by the user in all cases. But this view fetches ALL records when user clicks on pagination, without considering the search criteria. This is the problem I am facing.
    I am doing the following:
    Since tabular form does not support pl/sql function returning query, I cannot use a table directly. I need my results based on search criteria selected by user. Hence I created a dynamic view and used a "INSTEAD OF UPDATE" trigger to update the table.
    I use a set bind variables procedure, on load before header for setting the variables.
    This view fetches the correct data based on user search always. It creates a problem only in one situation, when using pagination in the report.
    The example can be found at:
    http://apex.oracle.com/pls/otn/f?p=19399:1:
    username = [email protected]
    pwd = kishore
    Here if "manager name" is entered as test, we get 5 records in "Summary of requests" report and 5 records in "Inactive Requests" report. When user clicks on Pagination in any of the reports, ALL the 7 records get fetched in "Summary of Requests" and 6 records in "Inactive Requests". How can I overcome this problem?? The report must consider the search variables even when pagination occurs.
    Is this because, the inbuilt "html_PPR_Report_Page" executes the region query once again by considering all search variables as NULL?
    Backend Code is at:
    http://apex.oracle.com/pls/otn/
    workspace: sekhar.nooney
    Username :[email protected]
    pwd: kishore
    application id = 19399
    My region code is something like:
    select *
    from regadm_request_v
    where access_type = :F110_REGADM
    and status <> 'INACTIVE'
    order by request_id
    My view code is:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGREGOWNER.REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_NAME),'%')||'%'
    AND upper(manager_name) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_NAME),'%')||'%'
    AND upper(employee_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_EMPLOYEE_SUNET_ID),'%')||'%'
    AND upper(manager_sunetid) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_MANAGER_SUNET_ID),'%')||'%'
    AND upper(request_date) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_REQUEST_DATE),'%')||'%'
    AND upper(USAGE_AGREEMENT_RECVD) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD,'~!@',NULL,REGADM_REQUEST_PKG.GET_USAGE_AGREMNT_RECVD)),'%')||'%'
    AND upper(STATUS) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_STATUS,'~!@',NULL,REGADM_REQUEST_PKG.GET_STATUS)),'%')||'%'
    AND upper(REQUEST_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_REQUEST_APPROVED,'~!@',NULL,REGADM_REQUEST_PKG.GET_REQUEST_APPROVED)),'%')||'%'
    AND upper(nvl(APPROVAL_DATE,sysdate)) LIKE '%'||nvl(upper(REGADM_REQUEST_PKG.GET_APPROVED_DATE),'%')||'%'
    AND upper(APRVL_REQUEST_SENT) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS,'~!@',NULL,REGADM_REQUEST_PKG.GET_EMAIL_APPROVERS)),'%')||'%'
    AND upper(NOTIFY_APPROVED) LIKE '%'||nvl(upper(DECODE(REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION,'~!@',NULL,REGADM_REQUEST_PKG.GET_APPROVAL_NOTIFICATION)),'%')||'%'
    I would be glad for any suggestions.
    Andy/Varad any ideas? You both helped me a lot on my problems for the same application that I had faced before in More Problems in Tabular form - Please give me suggestions.
    Thanks,
    Sumana

    Hi Andy,
    The view and the package for setting bind variables work properly in my entire application other than the pagination. A pity that I came across this only now :(
    I have used this same method for holding variables in another application before, where I needed to print to PDF. I used this approach in the other application because my queries were not within the APEX character limit specified for the "SQL Query of Report Query shared component".
    In this application, I initially had to fetch values from 2 tables and update the 2 tables. Updateable form works only with one table right? Hence I had created a view. Later the design got changed to include search and instead of changing the application design I just changed the view then. Still later, my clients merged the 2 tables. Once again I had just changed my view.
    Now, I wanted to know if any method was available for the pagination issue (using the view itself). Hence I posted this.
    But as you suggested, I think it is better to change the page design quickly (as it would be much easier).
    If I change the region query to use the table and the APEX bind parameters in the where clause as:
    SELECT *
    FROM REGADM_REQUEST
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    I also changed the ApplyMRU to refer to the table.
    Here the pagination issue is resolved. But here the "last Update By" and "Last Update Date" columns do not get updated with "SYSDATE" and "v(APP_USER)" values, when update takes place. Even if I make the columns as readonly text field, I am not sure how I can ensure that SYSDATE and v('APP_uSER') can be passed to the columns. Any way I can ensure this? Please have a look at the issue here: http://apex.oracle.com/pls/otn/f?p=19399:1:
    I have currently resolved the "last update" column issue by modifying my view as:
    CREATE OR REPLACE VIEW REGADM_REQUEST_V
    AS
    SELECT *
    FROM REGADM_REQUEST
    I modified my region query to use APEX bind parameters itself as:
    SELECT *
    FROM REGADM_REQUEST_V
    WHERE upper(employee_name) LIKE '%'||nvl(upper(:P1_EMPLOYEE_NAME),'%')||'%' .....
    And I use the "INSTEAD OF UPDATE" trigger that I had initially written for update. The code is:
    CREATE OR REPLACE TRIGGER REGADM_REQUEST_UPD_TRG
    INSTEAD OF UPDATE
    ON REGADM_REQUEST_V
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    UPDATE REGREGOWNER.REGADM_REQUEST
    SET MANAGER_EMAIL = :NEW.MANAGER_EMAIL
    , EMPLOYEE_EMAIL = :NEW.EMPLOYEE_EMAIL
    , STATUS_UPDATE_DATETIME = SYSDATE
    , USER_UPDATE_ID = (SELECT v('APP_USER') FROM DUAL)
    WHERE REQUEST_ID = :OLD.REQUEST_ID;
    END;
    Please let me know how I can resolve the "last update" column issue using the table itself. (Just for my learning)
    Thanks,
    Sumana

  • Error message while viewing Purchase order summary

    Hi all,
    we are in 11.5.10.2 , we are getting error message while viewing purchase order "Currency formatting cannot be performed without a currency code".
    is it beacuse of currency not popluated in Purchase order?
    Verified metalink note - 960504.1
    Thanks
    Kiran

    Hi Kiran,
    Verified metalink and other areas but could not get any appropriate solution.
    I tried to reproduce the issue in various available environments...but no luck!
    My guess would be the datafix/BUG that you have referred in the MOS note 960504.1
    Please check with your DBA for this patch in test instance.
    Thanks
    -Arif.

  • Pass values to OAF search page (View Purchase Order History)

    I need to call a OAF page from a PO Approval Notification. I need to call page View Purchase Order History (func:ICX_PO_REVISIONS).
    I am able to create the URL (using function FND_RUN_FUNCTION.get_run_function_url) and when I click on the link it opens the page fine, but it’s a page that contains simple search region and I need to populate the Operating Unit and PO Number fields (I can easily get from the PO) of the search fields, this will allow the user to just click the go button.
    Is it possible using the function FND_RUN_FUNCTION.get_run_function_url and passing parameters (field values) or setting the URL to JSP:/OA_HTML/OA.jsp?OAFunc=ICX_PO_REVISIONS&akRegionApplicationId=177&addBreadCrumb=Y&CorePO=Y and then passing the parameters?
    How would you achieve this if possible, call the page and populate the search field values? It does not seem to work, I have been able to pass paramaters to an OAF page that does not contain a simple search region to return results.
    Function paramaters:
    FND_RUN_FUNCTION.get_run_function_url (
    p_function_id => 3101,
    p_resp_appl_id => 201,
    p_resp_id => 50598, -- MS Purcahsing Superuser
    p_security_group_id => 0,
    p_parameters => 'PoNum=' || l_document_id || '&' || 'retainAM=Y' || '&' || 'addBreadCrumb=Y',
    p_override_agent => NULL,
    p_org_id => 101,
    p_lang_code => NULL,
    p_encryptParameters => FALSE);
    Thanks,
    Shaun

    What I found is there are 2 variables SiteName and SiteName1, if you use SiteName1 then it shows proper value as a site description. I replaced SiteName with SiteName1 and it works. This might help to all who are like me and trying Tutorial example.
    I am not sure how many may have tried OAF - Tutorial examples. They are really complicated and not easy and in most cases they are not coming out in first try but if you really try then it will give lot of understanding.

  • How to restore views and procedures after drop user command?

    How to restore views and procedures after drop user command?
    We have 817 EE on NT and one developer created a lot of procedures, functions and vews. DB was not backuped and archived and export has not been done - our fault and we understand it. Sorry for this.
    Ok, now the story: another developer dropped this db user and we lost everything: procedures, functions and vews. The new user with trhe same name was created and new schema was imported in this user, but all old objects are lost. We don't have export and backup and archive log files.
    Question: may we can restore this lost stuff from some other sources. We are looking for lost codes, not data. May be we can use redo logs or shared pool or any other things. Any idea will be appreciated.
    Thanks.
    Victor
    [email protected]

    The switch has occurred after user was dropped, the data has been overwritten and there is be no way to use redo log files.
    I would like to explore another opportunity. Is possible to use Shared Pool or any Data Dictionary internal information to restore texts of the lost SQL and PL/SQL scripts executed in this DB before user was dropped? Not too many scripts are executed in this DB and the lost ones may still be in stack. I remember that Shared Pool (cash) should keep last executed scripts in order to improve performance. They probably are kept in some special format. Can we restore these scripts? Of course they also might be pushed out by Import that had been done after user was dropped.
    Thanks for your help,
    Victor

  • Album view in order of date added. Is it possible?

    album view in order of date added. Is it possible?
    In v10 I got used to ordering my music library with the newest additions on top, date added with the album view if it didn't take up more space.
    Now it's just the songs and I really don't like this. Album view is interesting but usless in alphebetical order which seems to be the default.
    I was told by another person here to use a smart playlist but the method they suggested was not clear.
    Can someone please explain how to do this or if there is a better alternative for someone who liked the old song view>date added>with album art?
    -thanks

    Welcome to the Apple Discussions. By "nr" are you referring to the shipping invoice that comes with the book? If so the answer is no. To order a book the library containing the book needs to be used.
    If someone had a copy of the library that created the book initially they could order a book on their own Apple account without you knowing about it. *+BUT they would have to have a copy of the iPhoto LIbrary to do so.+*
    So unless you think someone had access to your computer which housed the library a second copy of the book could not have been ordered.
    OT

  • Best practice for making changes to Oracle apps business views and BAs/fold

    HI
    The oracle BI solution comes with pre-defined Business Views- database views and Business Areas and folders. If we want to customize those database views or BAs and folders what will be the best practice in order to avoid losing it during any upgrades.
    For ex Oracle out-of box Order Management BA that we are using heavily needs some additional fields to be added to Order Header and Order Lines folders and we also want to add some custom folders to this BA.
    If we do the changes to the database views behind this BA would they be lost during the upgrade or do we have to copy(duplicate) those views, updated them and create a custom BA and folders against those views.
    Thanks

    Hi,
    If you are adding new folders then just add them to the Oracle Business Area. The business area is just a collection of folders. If the business area was changed in an upgrade the new folder would not be deleted.
    If you want to add fields to the existing folders/views then you have 2 options. Add the field to the defining base view (these are the views beginning OEBV and OEFV) and then regenerate the business views. This may be overwritten if the view is upgrade but this is unlikely.
    Alternatively, copy the view to create a new version and then map the old folder to the new view and refresh. You may need to re-map the folder if the folder is upgraded, but at least you have a single folder used by both Oracle and custom reports.
    Rod West

  • Unable to view purchase orders in SNC for the supplier

    Hi folks,
    iam facing the problem of unable to view purchase orders in the supplier portal for my supplier.
    ECC 6.0, PI 7.0, SCM 5.0 are the systems being used.
    scenario is like :
    for plant 1000, purchase order is created on vendor 1100 and idoc sent to PI successfully
    also in PI in the integration builder i find messages saying successfully sent to SCM system
    SLG1 transaction in SCM says message received successfully, (in the log i can see the plant, supplier, order no and order details)
    when i try to login to supplier view with supplier login, iam unable to view the orders,
    please let me know if iam missing any thing in this regard.
    cheers.

    Hi Kiran
    Could you check queues
    smq1 and smq2 ????
    Does your xml posted successfully in SNC(SXI_MONITOR)... Can you open the payload document
    inbound message-payloads-maindocument
    Check thoroughly whether any error information ????
    Check whether commit of xml is proper, or else refresh PI cache
    For your internet user and the xml rfc user(user who is pushing the data into SNC), check whether any update errors are available in so01(inbox)
    It could be a temporary problem, deactivate activate your supplier service in SICF. Could be problem with binding issue
    Just to make sure data is sitting in SNC
    Check this table
    /1OM/ORDR7MP3100
    Give your po number in field order no
    If you find, then it is problem with binding...If you dont find, then the xml update process has issue
    Kindly let us know the results
    Best Regards
    Vinod
    Best Regards
    Vinod

  • Unable to view Purchase order in Receiving Transactions

    I am unable to view Purchase Orders in OPM (Recieving transactions- when i query up my Receipt transactions)
    I want to be able to View the PO by going to Tools -> View Purchase Orders

    Hi,
    I believe you are missing a sub-menu which facilitates to open the purchase order on the the responsibility menu you are working with. This is the cause for the issue I guess.
    Please refer the below note:
    Receiving Transactions Summary - View Accounting - Function Not Available To This Responsibility (Doc ID 865884.1)
    Note: In the above note, when trying tools > View accounting in the same form the user get the same issue. Similarly as solution proposed by the note, adding the missing sub menu to the menu will allow you to view the purchase order.
    Please add the purchase order view sub menu on the responsibility menu you are working with and check if the issue is solved.
    Please try this in your test Server and migrate the solution to the PROD.
    Hope this helps!
    Best Regards

Maybe you are looking for