Found Difference between 9i  & 10g order by result

Hello Guru's
I have created following table in both 9i and 10g
test1 with Columns as below
A VARCHAR2(10)
B NUMBER
Inserted 2 records in 9i and 10g ( same data)
*9i Result:*
SELECT * FROM test1;
A B
2 1
2 2
*10g result:*
SELECT * FROM test1;
A B
2 1
2 2
But if I use order by clause getting different result.
*9i Result:*
SELECT * FROM test1 order by a;
A B
2 1
2 2
*10g result:*
SQL> select * from test1 order by a;
A B
2 2
2 1
Please help about this output mismatch for same query in 9i and 10g.
Thanks In Advance.
Sandeep.

What is your exact oracle version?
It seems that your theory is true at least in these version - (Strange....)
In, 9i ->
satyaki9i>
satyaki9i>select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production
PL/SQL Release 9.2.0.1.0 - Production
CORE    9.2.0.1.0       Production
TNS for HPUX: Version 9.2.0.1.0 - Production
NLSRTL Version 9.2.0.1.0 - Production
Elapsed: 00:00:00.00
satyaki9i>
satyaki9i>
satyaki9i>create table strange
  2   (
  3     a    number,
  4     b    number
  5   );
Table created.
Elapsed: 00:00:00.00
satyaki9i>
satyaki9i>insert into strange values(&a,&b);
Enter value for a: 2
Enter value for b: 1
old   1: insert into strange values(&a,&b)
new   1: insert into strange values(2,1)
1 row created.
Elapsed: 00:00:00.00
satyaki9i>/
Enter value for a: 2
Enter value for b: 2
old   1: insert into strange values(&a,&b)
new   1: insert into strange values(2,2)
1 row created.
Elapsed: 00:00:00.00
satyaki9i>
satyaki9i>commit;
Commit complete.
Elapsed: 00:00:00.00
satyaki9i>
satyaki9i>SELECT * FROM strange;
         A          B
         2          1
         2          2
Elapsed: 00:00:00.00
satyaki9i>
satyaki9i>SELECT * FROM strange order by a;
         A          B
         2          1
         2          2
Elapsed: 00:00:00.00
satyaki9i>
satyaki9i>In 10g,
satyaki10g>
satyaki10g>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.03
satyaki10g>
satyaki10g>
satyaki10g>
satyaki10g>create table strange
  2   (
  3     a    number,
  4     b    number
  5   );
Table created.
Elapsed: 00:00:00.05
satyaki10g>
satyaki10g>insert into strange values(&a,&b);
Enter value for a: 2
Enter value for b: 1
old   1: insert into strange values(&a,&b)
new   1: insert into strange values(2,1)
1 row created.
Elapsed: 00:00:00.00
satyaki10g>
satyaki10g>/
Enter value for a: 2
Enter value for b: 2
old   1: insert into strange values(&a,&b)
new   1: insert into strange values(2,2)
1 row created.
Elapsed: 00:00:00.00
satyaki10g>
satyaki10g>commit;
Commit complete.
Elapsed: 00:00:00.00
satyaki10g>
satyaki10g>SELECT * FROM strange;
         A          B
         2          1
         2          2
Elapsed: 00:00:00.00
satyaki10g>
satyaki10g>SELECT * FROM strange order by a;
         A          B
         2          2
         2          1
Elapsed: 00:00:00.00
satyaki10g>
satyaki10g>Let me go through the docs.
Regards.
Satyaki De.

Similar Messages

  • Important differences between oracle 10g and 11g

    Hi friends, can anyone tell me (pointwise) what are the major (and minor) differences between Oracle 10g and 11g.
    Please point me to some documents if possible.
    Thanks in advance

    The name of the link says it all: "top_features."
    In short it is Oracle's list of what they have for marketing and sales reasons designated "top features."
    It is not intended to be, and is not, a complete list of features. Often the features Oracle does not
    talk about are the most important.
    Let me give you some examples. I have never seen Oracle announce DBMS_XPLAN as a new feature
    yet you should not run an explain plan without it. Neither have I ever seen Oracle announce the new
    NO_DATA_NEEDED predefined exception. I have listed literally hundreds of new features you will not
    find in Oracle's new features docs.
    I did a presentation at OpenWorld this year as part of the unconference titled "New Features in
    Database 11gR2 that Oracle will not announce." It was easy to prepare a one hour presentation with
    little fear of being proved incorrect. As I turned out only one of the features I presented was mentioned
    by Oracle.
    You can find the presentation slides here:
    http://www.morganslibrary.org/pres/oow09_ucnf.pdf

  • Difference between snp planned order and pp/ds planned order

    Hi to all,
    can any one please explain the difference between snp planned order and pp/ds planned order. I am relatively new to this area

    The primary differences are as below.
    1. The master data for SNP Planned Order is SNP PPM/PDS where the minimum duration for an operation is a day. So it is used for rough cut capacity planning.
    The master data for PPDS Planned Order is a PPDS PPM/PDS where operations are down to minute and second level. Moreover sequence dependent operation planning is possible in PPDS Planned Orders. It is for detailed capacity planning.
    2. SNP Planned Orders are created in SNP while PPDS Planned Orders are created in PPDS or when transferred from ERP to APO.
    3. SNP Planned Order need to be converted to a PPDS Planned Order before it can be used in the Execution System (ERP) for further processing - like conversion to Production Order. Moreover the category types of the orders are different in APO (EE for SNP and AI for PPDS).
    Hope this helps.
    Somnath

  • Difference between Delivery, Sales order and  Shipment

    Hi
    I would like to know difference between sales document, delivery document and shipment.
    When is the delivery created? What data will it have?

    Hi
    <b>Sales Documents </b>
    Sales-related business transactions are recorded in the system as sales documents. These are grouped into four categories:
    Pre-sales documents: inquiries and quotations
    Sales orders
    Outline agreements, such as contracts and scheduling agreements
    Customer problems and complaints, leading to free-of-charge deliveries and credit memo requests
    If your particular business processes require it, you can process deliveries and billing documents directly from a sales document. In addition, some sales documents, such as cash sales and rush orders automatically trigger the creation of subsequent delivery and billing documents.
    Basic Functions Within Sales Order Processing
    During sales order processing, the system carries out basic functions, such as:
    Monitoring sales transactions
    Checking for availability
    Transferring requirements to materials planning (MRP)
    Delivery scheduling
    Calculating pricing and taxes
    Checking credit limits
    Creating printed or electronically transmitted documents (confirmations and so on)
    <b>Delivery Processing</b>
    In its role as central object of the goods issue process, the outbound delivery supports all shipping activities including picking, packing, transportation and goods issue. During the outbound delivery process, shipping-planning information is recorded, status of shipping activities is monitored and data accumulated during shipping processing is documented. When the outbound delivery is created, the shipping activities, such as picking or delivery scheduling, are initiated, and data that is generated during shipping processing is included in the delivery.
    Range of Functions
    An outbound delivery can be created as follows:
    With reference to a sales order
    With reference to a stock transport order
    With reference to a subcontract order
    <b>Shipping </b>
    Shipping is an important part of the logistics chain in which guaranteed customer service and distribution planning support play major roles.
    In shipping processing, all delivery procedure decisions can be made at the start of the process by
    Taking into account general business agreements with your customer
    Recording special material requests
    Defining shipping conditions in the sales order
    The result is an efficient and largely automatic shipping process in which manual changes are only necessary under certain circumstances.
    Integration
    The Shipping component is integrated under the Logistics Execution component. Shipping is a subsequent activity of the Sales component.
    Range of Functions
    The shipping module supports the following functions, which include but are not limited to:
    Deadline monitoring for reference documents due for shipment (sales orders and purchase orders, for instance)
    Creating and processing outbound deliveries
    Planning and monitoring of worklists for shipping activities
    Monitoring material availability and processing outstanding orders
    Monitoring the warehouse's capacity situation
    Picking (with optional link to the Warehouse Management system)
    Packing deliveries
    Information support for transportation planning
    Support of foreign trade requirements
    Printing and transmitting shipping documents
    Processing goods issue
    Controlling using overviews of
              o Deliveries currently in process
              o Activities that still are to be carried out
              o Possible bottlenecks

  • What are the major differences between oracle 10g and oracle express 10g

    Hi
    Can anyone tell, What are the major differences between[b] oracle 10g and oracle express 10g.
    Or if you know any URL, then please do let me know.
    Advance Thanks
    JC

    Dear sir,
    here it is.
    http://www.oracle.com/database/product_editions.html

  • Difference Between OBIEE 10g and OBIEE 11g

    Hi everyone,
    I have a doubt when choosing two versions of OBIEE, 10g and 11g.
    Actually, is there any big difference between 10g and 11 version ?
    From the point of view of easiness finding tutorial in internet, simplicity of using the tool, and other considerations, which one is better ?
    I hope you guys could also explain with your arguments.
    Thanks

    Hi,
    Few differences..
    Architectures-
    OBIEE 11g architecture...http://www.rittmanmead.com/2010/07/09/obiee-11gr1-architecture-and-use-of-weblogic-server/
    OBIEE 10g architecture....http://gerardnico.com/wiki/dat/obiee/obiee_overview
    Features-
    New features in OBIEE11g...Re: OBIEE 11g
    http://blogs.oracle.com/robreynolds/2010/07/new_administration_features_of.html
    I have a doubt when choosing two versions of OBIEE, 10g and 11g.If you are new to OBIEE its best to start with 10g,there are lot changes in 11g.It takes time to get used to it and you many not get enough docs or material to read,may face some new issues also.
    Actually, is there any big difference between 10g and 11 version ? Yes there are some differences between them...you can see them in above links.(many things like graphs,server)
    From the point of view of easiness finding tutorial in internet, simplicity of using the tool, and other considerations, which one is better ?For sure obiee 10g as 11g is new many of them just started using it,so you may get less help on this if you face issues & may not get enough tutorial in internet and OBIEE10g is bit easy to use.
    Its best to you go for OBIEE10g,parallely you can try 11g.
    Regards,
    Srikanth
    Edited by: Srikanth Mandadi on Oct 7, 2010 11:08 AM

  • Difference between oracle 10g R1 and R2

    hi,
    I would like to know is there are any difference betweeen oracle 10g R1 and R2. I am using forall condition in a select statement. The query is runnign fine in R2 and not in R1.
    Kinldy update.
    Rgds....

    user537350 wrote:
    hi,
    I would like to know is there are any difference betweeen oracle 10g R1 and R2. I am using forall condition in a select statement. The query is runnign fine in R2 and not in R1. One of the differences is that R1 is obsolete and no longer supported.
    Other than that, there are about 2 years of software changes between the .1 of each release. According to http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/whatsnew.htm#sthref37 there was some work done in forall in R1, so they probably got it right by R2.
    Can I assume you have an unpatched R1?

  • Differences between Oracle 10g Enterprise and Standare editions

    Can someone please direct me to a link where I can find the differences between Enterprise and standard editions? Thanks in advance.

    10g provides many self-tuned festures like SGA. Browser based DBcontrol, AWR, ADDM, advisors ....

  • What are the differences between ESB 10g and OSB 10g

    Hi,
    I'm newbie to OSB 10g. I have installed OSB 10g.
    I came to know after Oracle acquired BEA, the ALSB is renamed as OSB.
    I'm curious to know what are the differences between ESB and OSB.
    If there are many differences, please post any links which provide the required information in detail.
    Thanks in advance.
    Regards,
    Udaya

    the 'old' esb has been renamed to mediator and is now only used as component in your sca application.
    the two service buses can't really be compared since the osb (former alsb) has way more functionality in it.
    Oracle gave it it's own place in his soa portfolio and the old esb can only be used als mediator in your sca application.
    On top of your sca application you could use the OSB to complete your architecture design.
    the difference between both.
    esb (now used as mediator) can only be used in your sca application
    in here you will use it mostly for routing/transformation, and there is some functionality for assign/java callouts conditional routing
    the osb is complete product with a lot of functionality in it. Everything you used the old 'esb' for can be done in the OSB and with a lot of extra's.
    routing/transformation/service call outs/java callouts/transport virtualization/security/and more and more
    you should read the guides of the OSB to get an idea of everything it can do for you.
    http://www.oracle.com/technetwork/middleware/service-bus/overview/index.html

  • Is there Any difference Between OBPM 10g And AlBPM 6.0

    Hello Friends
    I would like know is There any difference between the Oracle BPM 10g and ALBPM 6.0 . ??
    The second one is Difference between AlBPM5.7 and ALBPM 6.0
    Thanks In Advance
    with Regards
    Sandeep
    Edited by: user12036530 on Oct 18, 2009 9:08 PM

    For 10g Differences, check out: http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/upgradeguide/deliverables/upgrade_guide/c_Head_Reference.html
    And other 10g Documentation: http://download.oracle.com/docs/cd/E13154_01/bpm/docs65/index.html Specifically: Upgrade Guide, Process API Differences (if you use PAPI)
    For 6.0 Differences, check out the Documentation: http://download.oracle.com/docs/cd/E13165_01/albsi/docs60/index.html Specifically: ALBPM 6.0 New Features Overview
    Hope this helps,
    -Kevin

  • Major differences between Oracle 10g Release 1 and Oracle 10g Release 2?

    What are the major changes and differences between Oracle 10.1 and 10.2?
    Thanks

    Why not look through the 10.2 New Features doc?
    In my experience, the "major changes" are almost always environment-specific. "Transliteration for Japanese Kana Conversion", for example, is likely to be a huge deal for a few organizations (i.e. big enough to justify a migration all by itself). Other organizations and applications, on the other hand, won't care in the least.
    Justin

  • What is the difference between TECO and Order settlement?

    What is the diff. between TECO and order settlement and what is the use of both?

    Hi,
    Technical completion means ending a production order from a logistical viewpoint. This function is usually used, if the execution of an order has to be stopped prematurely or if the order could not be executed in the required manner and open requirements for the order (reservations, capacities) should be deleted.
    Where as Settlement of an order is carried out periodically to settle the costs related to the order to a settlement receiver.
    for more details read
    http://help.sap.com/saphelp_46b/helpdata/en/a9/ab7422414111d182b10000e829fbfe/frameset.htm
    and
    http://help.sap.com/saphelp_46b/helpdata/en/a3/664a3397e311d1b5a70000e8359890/frameset.htm
    Regards,
    Sumeet

  • Xpath difference between Oracle 10g and Oracle 11g

    All,
    I'm working on moving our existing stored functions from Oracle 10g (10.2.0.4.0) to Oracle 11g (11.2.0.1.0) and so far, everything has worked just fine on Oracle 11g...execpt for one xpath statement.
    The statement below works fine in Oracle 10g (10.2.0.4.0):
    extractValue(inv_dtl_img, '/service//ground/sortKeyCode') AS "srt_key_cd",
    Please note: I need to use the double slash "//" in order to ignore the two different elements in the schema.
    However, in Oracle 11g (11.2.0.1.0), when this statement is executed in the stored function, I get this:
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected - got -
    The extractValue command is pulling data out of an XMLType column, and the corresponding XML schema looks like:
    <service>
    <trans>
    <ground>
    <sortKeyCode>
    </sortKeyCode>
    </ground>
    </trans>
    <nontrans>
    <ground minOccurs=0>
    <sortKeyCode>
    </sortKeyCode>
    </ground>
    </nontrans>
    </service>
    Please note: In the XML message, the "trans" and "nontrans" elements are exclusive, so both will never be populated at the same time. A typical XML message would look like this:
    <service><trans><ground><sortKeyCode>3</sortKeyCode></ground></trans></service>
    or this:
    <service><nontrans><ground><sortKeyCode>5</sortKeyCode></ground></nontrans></service>
    In the schema, the sortKeyCode has been defined in both places as "string maxlen=3", so the datatype of that element is exactly the same in both the "trans" and "nontrans" sections of the schema. The only difference in the schema (outside of the trans and nontrans tags) is the fact that the second "ground" tag is defined with a "minOccurs=0". Could Oracle 11g be treating the schema differently than Oracle 10g, resulting in the error?
    Any thoughts would be appreciated.

    The only way to get an quick answer to that one is to file a service request with Oracle support. It could be a bug or a correct change regarding W3C behavior. Despite this, you moving to 11.2, the extract/extractvalue etc propriety Oracle solutions are deprecated from 11.2 and onwards. The more sensible way to move forward, although, I know more work intensive, is to apply the XQuery alternatives like xmlexist, xquery or xmltable functions.
    Moving to EXTRACT is a bad idea, because this alway will be treated as an XML fragment. If you unlucky then Oracle will deal with this in memory via DOM (the standard solution regarding XML parsing if every smart thing within Oracle can not be applied) and this will result in a performance downgrade due to high CPU and Memory consumption/overhead...
    Your pick...

  • Differences between Oracle 10G Client ODBC from 10.1.x to 10.2.x (datatype)

    What differences where implemented to Oracle 10G Clients ODBC connectivity drivers between 10G Release 1 and Release 2 concerning datatypes?
    I have an application that performs a qualified read returning a group of records (this is successful) and then performs a delete on each record read. No errors occur on completion of the application. When using release 1, the records are physically removed. Using release 2 a portion of the same group of records are not removed. The key for the table is a numeric field with six decimal places (not my design). My applications C code defines the field as a DOUBLE.

    I certainly agree that something changed. The question is whether it was a change in function or not. With a lot of these sorts of errors, tracking down the "source" of the error involves finding a change in a piece of code that allowed what was always possible to actually occur. That is, you may have two pieces of code that are functionally identical but that end up allowing the sorts of "round off" errors that are always possible when using doubles. The driver might, for example, now be going down a code path where it shifts a number to the right or left rather than dividing or multiplying by 2, which may make this sort of thing more likely. Functionally, given that doubles don't guarantee infinite precision, these operations are identical, but one may be significantly more likely to cause problems.
    Is your application using the ODBC API directly? Or is it going through a higher-level API? If you are going through ODBC directly, you might look to see whether the data types that are being returned by the driver to your code are the same across driver versions.
    Justin

  • Difference between Oracle 10g and Oracle 11g when using Distinct in SQL

    Hi All,
    When I use Distinct in Oracle 10g, the result would be sorted in ascending order automatically, while there is no sorting in the result set in Oracle 11g.
    I was using plsql developer to run my sql.
    May I know if anyone have the same experience before?
    Is there any kind of setting in 11g that I can make the result in order? Thanks!
    Edited by: user5810051 on 2011/4/6 下午 8:47

    As acadet says, if you want your result ordered you must specify an ORDER BY clause in your query. Just because previous versions of oracle included some ordering as part of the processing of a query, that was not a guaranteed ordering, but just a side-effect. Now that Oracle have improved the internal workings, they've removed the side-effect, and that's why you're not getting the ordering you want, because you were relying on that side-effect rather than explicitly stating the order you wanted.

Maybe you are looking for

  • How to post Credit Note to the vendor for purchasing of an Asset last  year

    Hi Mates, The scenario is as follows: -Asset purchased for Rs. 10000 in Fiscal year 2006. -The said asset is depreciating every month since aquisitioned as it happens. -Now in current fiscal year 2007, due to some reason, we want to debit the vendor.

  • How to get full resolution on Samsung E2420L monitor?

    I bought a Samsung E2420L external monitor for my MacBook Pro.  The box says 1920 x 1080, however I can't seem to get the Mac to push more than 1600 x 900.  Samsung doesn't list any Mac drivers, how can I get the full resolution? Thanks!

  • String deprecation

    I have a warning when compiling a jdk1.1 file under j2sdk1.4 the String(byte[],int)has been deprecated and I didn't understand how to change the instruction using string constructors as it is said in the note in the documentation. please tell me how.

  • Session problems on wls6.1

    We have two domains with an identical application but one can pass out login credential through the session without any problems and the other just cannot retrieve the reference from the session. Both have the same session settings. Can any one point

  • IPhoto slideshow photo quality?

    I am working on a slideshow and it appears that the photos are losing resolution in the slideshow...how can I keep the clarity and sharpness in the photos?