RowNumber = 1 return different data

We are preparing the upgrade to oracle 11g 2 to 12 c.

We have some test environment to test extracts which is in c 11g 2 and 12.

Even extract script, the same data, another server with a different version of the database a to 11 g 2, the other is 12 c.

Most of the snippets returned exactly the same data.

But for a small number of extracts in .dat file returns a little bit different. We checked into it, it's because the script extracts using a function in the database and it uses rownumber = 1, same order. But another server returns a different record. For example, they return guardian meeting certain criteria, in this case, relatives are Ok, but we wonder why he returned differently. Is there a setting or is there a default sorting of columns in oracle if not specifically using order by?

Thank you

Hello

Oracle does not guarantee that queries would return the same results if used as below.

Select * from sample_table

where rownum = 1;

You may need to use like below to get the same results (Top N queries)

SELECT column_name, rownum AS rnum

FROM (SELECT column_name

OF sample_table

ORDER BY column_name)

WHERE rownum<=>

Kind regards

Wilson

Tags: Database

Similar Questions

  • Select ROLE_TAB_PRIVS as sys and schema_owner return different data; Why?

    This code returns seven points of view that are not valid, and therefore not in the role that grants select access to them.



    sys@database > select view_name

    2 of all_views

    3 where owner = "SCHEMA_OWNER."

    4 and view_name not in)

    5. Select TABLE_NAME

    role_tab_privs 6

    7 where role = "SELECT_SCHEMA_OWNER")

    8.

    VIEW_NAME

    ------------------------------

    VIEW001

    ...

    VIEW07

    7 selected lines.

    sys@database > user conn [schema_owner]

    Enter the password:

    1. Connected.

    schema_owner@database > select view_name

    2 of all_views

    3 where owner = ' SCHEMA_OWNER)'

    4 and view_name not in)

    5. Select TABLE_NAME

    role_tab_privs 6

    7 where role = "SELECT_SCHEMA_OWNER")

    8.

    VIEW_NAME

    ------------------------------

    VIEW001

    ...

    VIEW077

    77 selected lines.

    schema_owner@database >

    If a view is invalid, you cannot grant select on it for anything.

    I found my answer "Information is provided only on the roles to which the user has access" privileges granted to roles [ROLE_TAB_PRIVS] table

    Once I got the role of select_schemaOwner in schemaOwner, the query returns results.  It has to do with the x$ dealios in the role_tab_privs view.

  • How to configure a web service primavera to return the data in the second database?

    Hello world


    We have P6 with WS first deployment on a single weblogic domain server. The first WS returns the first instance of database data.

    Then deployed to the WS second tip on a weblogic domain server separated with a different port. Set up the second WS with < WS2_INSTALL_HOME > / bin/dbconfig.sh, creating a new branch a configuration that specifies one second instance of the database. However, this configuration is ignored, and the second web services return data from the database.

    We have a single domain, including notably the following servers:

    Name / host / Port / deployments

    P6 / localhost / 0001 / P6 (v8.3), p6ws1 (v8.3)

    p6ws2 / localhost / 0002 / p6ws2 (v8.3)

    We have now two different files BREBootstrap.xml.

    P6 BREBootstrap.xml:

    < database >

    < URL > JDBC:Oracle:thin:@db1:1521:db1 < / URL >

    < user name > pubuser < / name >

    password <>anycriptopass1 < / password >

    oracle.jdbc.OracleDriver < driver > < / driver >

    < PublicGroupId > 1 < / PublicGroupId >

    < / data >

    < CfgVersion > 8.330 < / CfgVersion >

    <>configurations

    < name BRE = 'P6 Config_DB1"instances ="1"logDir ="anydir, P6EPPM, p6, PrimaveraLogs"/ >

    < / configuration >

    p6ws2 BREBootstrap.xml:

    < database >

    < URL > JDBC:Oracle:thin:@DB2:1521:DB2 < / URL >

    < user name > pubuser < / name >

    password <>anycriptopass2 < / password >

    oracle.jdbc.OracleDriver < driver > < / driver >

    < PublicGroupId > 1 < / PublicGroupId >

    < / data >

    < CfgVersion > 8.330 < / CfgVersion >

    <>configurations

    < name BRE = 'P6 Config_DB2"instances ="1"logDir ="anydir, P6EPPM, ws2, PrimaveraLogs"/ >

    < / configuration >

    "P6 Config_DB1" and "P6 Config_DB2" including the property database for the database 1 and 2 respectively.

    How to set up a second web service to return the data to the second database?


    Thanks in advance!


    Kind regards

    Dmitry

    So, answer oracle support:

    Looks like it is in the documentation, Web Services cannot be configured in this way as the other modules. See the following topics:

    BUG 19516437 - Is it POSSIBLE TO hardcode a DEPLOYMENT of SERVICES WEB P6 to an INSTANCE of DATABASE? (ask if this is possible)

    BUG 19579735 - FOR BEING ABLE to hardcode A P6 WEB SERVICES DEPLOYMENT to A DATABASE INSTANCE (corresponding improvement because it can be done).

    The problem has been resolved by the following:

    1 create the WebLogic domain.

    2 P6 and p6ws deployed on managed servers.

    3 configuration P6 uses the second instance of database and P6 has not begun.

    4 result: the p6ws (from additional domain WebLogic) returns data for the second instance of the database.

    Kind regards

    Dmitry

  • Studio EQL erased when pointing to a different data field

    Hello

    I have this scenario with regard to the studio. The studio application has been set initially at DataDomain1. Then I put it in DataDomain2. Yet once, when I put the return of DataDomain1 none of the reports work!... It seems that all the EQL is erased and the configuration of the components is not retained. May I know the reason for this behavior. Is there a cure for keep an underlying the field of data even when application configuration settings is changed to a different area of data? Help you enjoy.

    Thank you

    Anusha

    That's exactly my point.  If the two data areas are totally different from each other, where is the value in preserving the configuration?  All components would not need to reconfigure?

    For example, let's say I have a configured component of guided Navigation to view the 5 groups of attributes.  Then, I want to pass the application that contains this component to point to a completely different data domain that does not have one of these groups of attributes (because, as you say, the two data areas are totally different).  What is the expected behavior?  I now have all of this configuration pointing to 5 groups of attributes that do not exist.  The configuration is totally disabled.

    Same would go for a chart bound to a view (example: 'Sales') with a bunch of parameters related to it based on some attributes.  If the data areas are totally different (as you said), the view would exist even in this new area of data?  Probably not, but let's say it was the case.  Are the same attributes?  They all do they exist?  What are their types?  By saying that the two data fields are totally different, you seem to indicate that the attributes would be totally different.  So even if the table had retained its configuration, the configuration would be totally useless and not valid?

    Now, there might be a portlet out there (say, a bar of Metrics) where the configuration is not valid but "fixable" (maybe?).  However, for the most part, you're views of design and configuration of the components for a data set.  When the underlying data is completely changed, the default behavior should be to keep around invalid configuration or slate?

    Note that if you want to change the data source connections in a given application (for example, I was bound to a Data Source that was limited to a few 'Sales' and I also wanted to include "Customers"), this feature is present in Application settings > connections to Data Source (with an option to keep the configuration).  However, I don't think that's what you're asking, and not what is intended by changing in the world of the field of data for an application.

    hope that helps.

    Patrick

  • query returns different results depends on the length of the day

    Hello!

    I have a query:

    INSERT /*+ APPEND */ INTO pwa_process (
    id,
    id_session,
    id_customer,
    s2k_account,
    service_seq_num,
    msisdn,
    id_tariff,
    contract_end_date,
    last_contract_date,
    next_available_contract_date,
    tariff_name,
    description,
    description_long,
    imei_old,
    activation_date,
    id_customer_number,
    arpu,
    value0,
    value1,
    value2,
    value3,
    value4,
    value5,
    id_pricing_plan)
    WITH msisdns AS (SELECT msisdn ms FROM customer_number cn
    JOIN customer_s2kaccount cs ON cn.s2k_account = cs.s2k_account AND cs.id_customer = v_customerId)
    SELECT
    seq_pwa_process.NEXTVAL,
    v_sessionId,
    customer_s2kaccount.id_customer,
    customer_s2kaccount.s2k_account,
    customer_number.service_seq_num,
    msisdn.msisdn,
    tariff.id,
    NVL(CASE WHEN date_contract_end IS NULL AND le_contract_end_date IS NOT NULL OR (date_contract_end < le_contract_end_date)
             THEN le_contract_end_date
             ELSE NVL(date_contract_end, ADD_MONTHS(customer_number.date_start, customer_number.ada_availability))
        END, TO_DATE('01.01.1970', 'DD.MM.YYYY')) contract_end_date,
    CASE WHEN NOT customer_number.date_first_activation IS NULL AND customer_number.date_first_activation >      (CASE WHEN ada_priority = 1 THEN ada_date_pwa
            WHEN ada_priority <> 1 AND (date_pwa IS NULL AND exchange_date IS NOT NULL OR date_pwa < exchange_date) 
            THEN exchange_date 
            ELSE date_pwa 
      END) 
         THEN customer_number.date_first_activation
         ELSE   (CASE WHEN ada_priority = 1 THEN ada_date_pwa
            WHEN ada_priority <> 1 AND (date_pwa IS NULL AND exchange_date IS NOT NULL OR date_pwa < exchange_date) 
            THEN exchange_date 
            ELSE date_pwa 
      END) 
    END last_contract_date,
    ADD_MONTHS(CASE WHEN NOT customer_number.date_first_activation IS NULL AND customer_number.date_first_activation > NVL(  (CASE WHEN ada_priority = 1 THEN ada_date_pwa
            WHEN ada_priority <> 1 AND (date_pwa IS NULL AND exchange_date IS NOT NULL OR date_pwa < exchange_date) 
            THEN exchange_date 
            ELSE date_pwa 
      END) ,
                                                                                                                           NVL(customer_number.date_first_activation, NVL(customer_number.date_start, customer_number.date_effective)))
                    THEN customer_number.date_first_activation
                    ELSE NVL(  (CASE WHEN ada_priority = 1 THEN ada_date_pwa
            WHEN ada_priority <> 1 AND (date_pwa IS NULL AND exchange_date IS NOT NULL OR date_pwa < exchange_date) 
            THEN exchange_date 
            ELSE date_pwa 
      END) , NVL(customer_number.date_first_activation, NVL(customer_number.date_start, customer_number.date_effective)))
               END, customer_number.ada_availability - DECODE(NVL(customer_number.current_contract_type, 0), 2, DECODE(customer_number.reduced_contract_used, 0, NVL(customer_number.el_contract_calculated_reduc,0), 0), 0)) next_available_contract_date,
    tariff.name_ada,
    DECODE(msisdn_group.def_column, 0, msisdn.value0, 1, msisdn.value1, 2, msisdn.value2, 3, msisdn.value3, 4, msisdn.value4, 5, msisdn.value5, msisdn.value0),
    msisdn.value0 || ';' || NVL(msisdn.value1, '') || ';' || NVL(msisdn.value2,'') || ';' || NVL(msisdn.value3,'') || ';' || NVL(msisdn.value4, '') || ';' || NVL(msisdn.value5, ''),
    customer_number.imei,
    NVL(customer_number.date_first_activation, NVL(customer_number.date_start, customer_number.date_effective)) date_start,
    customer_number.id,
    NVL(s2kaccount.arpu1,0),
    msisdn.value0,
    msisdn.value1,
    msisdn.value2,
    msisdn.value3,
    msisdn.value4,
    msisdn.value5,
    customer_number.id_pricing_plan
    FROM customer_s2kaccount
    JOIN customer_number ON customer_number.s2k_account = customer_s2kaccount.s2k_account AND customer_number.service_state = 'AB'
    JOIN msisdn ON msisdn.msisdn = customer_number.msisdn
    JOIN TABLE(CAST(v_tmp_table AS ADA.NUMBER_TABLE)) ids ON ids.column_value = msisdn.id
    JOIN msisdn_group ON msisdn_group.id = msisdn.id_msisdn_group
    JOIN pricing_plan ON pricing_plan.id = customer_number.id_pricing_plan AND pricing_plan.is_for_pwa = 1
    JOIN tariff ON tariff.name = pricing_plan.id
    JOIN s2kaccount ON s2kaccount.s2k_account = customer_number.s2k_account
    LEFT
    JOIN (SELECT msisdn, exchange_date, ADD_MONTHS(exchange_date, MAX(prolongation)) le_contract_end_date
    FROM loyalty_exchange a, msisdns
    WHERE a.msisdn = msisdns.ms AND exchange_date >= ALL (SELECT exchange_date FROM loyalty_exchange b WHERE b.msisdn = a.msisdn)
    GROUP BY msisdn, exchange_date) le ON le.msisdn = customer_number.msisdn
    WHERE customer_s2kaccount.id_customer = v_customerId;
    This query returns different results in the morning (09:00) and afternoon (16:00) on the same database for the same input data (I have prepared a script to test).
    Oracle 9.2.0.6 @solaris
    I checked the query plans, but they look the same in the morning and the afternoon. I don't know where to look for a problem/bug.
    Please help me with suggestions. is in bug with join ansi? or a left outer join?

    Published by: batonoff on February 16, 2009 16:56

    Published by: batonoff on February 16, 2009 16:58

    Published by: batonoff on February 16, 2009 17:00

    I recommend you post your declaration in the {} code tags (without the spaces) so that we can actually read.

    You are absolutely positive that nothing has changed on the data between when you run in the morning and in the afternoon?

  • iCloud full - found two backups with different dates

    My 20g iCloud storage is full.  When I went to manage my data, there were 2 backups of my iPhone with different dates.  Can I remove 1 of them (the older one I guess) without affecting my current phone?  I guess that's when I upgraded my iPhone 4 to 5

    Of,.

    Yes, as long as you can identify with certainty the backup latest.

  • How to convert an array of string elements to a cluster with elements named different data types?

    I'm looking for more help with the conversion of an array of elements of the chain in a cluster containing elements named different data types.

    I am importing data from an Excel worksheet.  He is coming in LabVIEW as separate (channels) 3 tables: 1) Variable name, (2) three possibilities Int, double, String) data type and the value 3), with the clues in each table corresponding to a separate variable (I have about 180 variables to import).  My ultimate goal is to convert the string array of 'Value' in a cluster.  But I want the correct data type in the cluster and I also the elements of the cluster name to match with the string 'Variable name' table so that I can use the Unbundle based on the name in my main VI.

    Please see attachment a Subvi for more details.  I did the size of the new items of tables 5 for simplicity.   I realize that labels property cannot be changed during execution and I don't think I need to do.  I just want to use the production cluster (mainly the unbundle by name) to help design my main VI.  I will need to 'read' and 'write for' the cluster during execution, but I won't need to change the names of the items.

    I was also wondering if there is a better way to import data from Excel?  Is it possible to import directly into a cluster immediately rather than put everything as strings?  I have attached a Subvi showing how I currently bring in data (found on the forum somewhere).  It comes as table 2D, which I divided into 3 separate tables that I mention above.

    I am open to any suggestion.  Thank you very much.

    -Mike

    Instead of trying to create a cluster, I think I would use only variant attributes.

  • In Windows Explorer. A dated file say 12/02/2000. When you click the folder, the files in the folder bear different date. Why is it so.

    ORIGINAL TITLE: I use Windows xp.

    I use Windows xp. In Windows Explorer. A dated file say 12/02/2000. When you click the folder, the files in the folder bear different date. Why is it so. To update the files, we should see the dates of the files instead of the dates of the folder. right? Why is there such a difference?

    My copy of Windows XP works the same as yours.  Apparently the date folder is not updated when the content is, that fact make some sense as the folder itself is not updated when new content is created in the it.

  • Tried to restore my computer to an earlier date & it keeps its back indicating it cannot restore to this date. I tried 6 different dates that are bold and assume to work. There is no info on what to do next

    Tried to restore my computer to an earlier date & it keeps its back indicating it cannot restore to this date.  I tried 6 different dates that are bold and assume to work. There is no info on what to do next

    Requel,.
    Thanks for posting on the Microsoft answers Forum.  The first thing I would suggest running a virus scan.  Make sure you have no virus causing problems.  If you do not have an antivirus program, then you can download it free here: http://www.microsoft.com/Security_essentials/

    If there is no virus or it still does not work after virus cleaning, then start in safe mode and test from there.  Here are the instructions for Safe Mode.

    Let us know the results. Mike - Engineer Support Microsoft Answers
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Dashboard calls between 2 different date columns

    Hi all

    I am creating a dashboard command prompt that will allow users to filter the report from 2 different date columns. We have an opening date column and a column of closing date. I want to allow users to choose an opening date and then a closing date that is at a later date. How could I go to set it up?

    Thank you in advance!

    I received your question, but I was not sure of your ability to create guest

    You will use 2 open and closed dates in the command prompt and set the variables in the presentation. In the report for this 1 date column use <= and="">= instead of operator.

  • How to set different date formats for different metadata fields?

    Hello

    Can I set different date for different fields of metadata formats? Standard Date format has a seconds. But I metadata fields, where I need to only show the date.

    I tried to use the rules and side effects. My code is: $xMyDate = formatDateOnly (xMyDate) $ >. But it does not work.

    Please how can I do?

    Thank you

    Martin

    Hi Laurent,.

    Large. This works. Good definition is:<$setValue("DOC_INFO","xDatumUkonceniRizeni",formatDateOnly(xDatumUkonceniRizeni))$>

    M.

  • lov based on synonym returns no data in R12

    Hello

    My question is this: after the update R12.1.3 of R11, a list of types of table of values based on a synonym - RA_BATCH_SOURCES - returns no data.

    The same query executed in SQL Developer returns data after you set the context with mo_global.set_policy_context.

    Checked the ORG_ID profile in the application and is on the same value used to set the context in SQL dev.

    No idea why this is happening?

    Thank you

    Alex

    Hi Alex,

    Can you please check this.

    Responsibility for the administration of the goto system.

    Competitor-> programs-> enter the short name of the simultaneous program-> go.

    Then update

    Go to tab application-> select mode of operating in single unit-> apply.

    Then check. Hope this will solve the problem.

    Thank you

    Manish

  • To a different data store of VSs

    I need to create a job to move VMs from a different data store.

    I've created a script like the following:

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer x.y.z.t - username

    $target = "Datastore2".

    $listaVM =

    "VM1."

    "VM2."

    "VM3,

    "VM4."

    "VM5."

    "VM6".

    {foreach ($vm to $listaVM)

    $vm

    Get-VM-name $vm | Move-VM - Datastore $target - DiskStorageFormat 'thin '.

    }

    The work seems to work but I need to improve so that:

    • After launching the command VM1, it waits until the move is completed
    • If VM2 cannot be moved for some reason any the ongoing process in process VM3
    • After processing each VM I get information on the status of the move (success, error,...)

    Can someone please help?

    Concerning

    Marius

    Try something like this

    The RunAsync will start moving in the background, then the While loop waits until the move is completed.

    The Task object, the status of the move is obtained.

    Add-PSSnapin VMware.VimAutomation.Core

    SE connect-VIServer x.y.z.t - username

    $target = "Datastore2".

    $listaVM =

    "VM1."

    "VM2."

    "VM3,

    "VM4."

    "VM5."

    "VM6".

    foreach ($vm in Get-VM-name $listaVM) {}

    $job = move-VM - VM $vm - $target - DiskStorageFormat "Thin" - RunAsync Datastore

    While ($job. PercentComplete - do 100)

    {

    sleep 5

    $job = get-job | where {$_.} ID - eq $job. ID}

    }

    Write-Host "$($job.)". Result) is migrated, status $($job.) State).

    }

  • SQL query return different result 11 GR 1 material and GR 11, 2

    Problem: SQL returns different results in 11 GR 1 material and GR 11, 2 games.

    Example script:

    create the table tab_main
    (
    SOS number (2) not null,
    contract number (2) null
    )
    /

    create the table tab_sub
    (
    number (2) of contract non-null,.
    SOS number (2) null
    )
    /

    insert into tab_main values (1, 10);
    insert into tab_main values (2, 20);
    insert into tab_main values (3, null);
    insert into tab_main values (4, null);

    insert into tab_sub values (1, 10);
    insert into tab_sub (20, 2) values;
    commit;

    The SQL code:

    SELECT *.
    OF tab_main.
    tab_sub
    WHERE tab_main.sos = tab_sub.sos (+) AND
    tab_main. Contract = tab_sub.contract (+) and
    tab_main. Contract not in (select 1 of the double);

    The above query gives more results
    -by 11.2.0.4
    1 10 10 1
    2 20 20 2

    -in 11.1.0.7
    1 10 10 1
    2 20 20 2
    4
    3


    Please tell us what could be the reason for the behaviour of offset lines thie.


    Thank you

    Piesset

    I think it is probably a bug in 11.1.0.7 (and possibly other versions), I get the same results as your 11.2.0.4 9.2.0.7, 10.2.0.3 and 11.2.0.3, and this is the result, I expect.

    Your not in the paragraph is equivalent to:

    SELECT *.

    OF tab_main, tab_sub

    WHERE tab_main.sos = tab_sub.sos (+) AND

    tab_main. Contract = tab_sub.contract (+) and

    tab_main. Contract <> 1;

    Since you have null values in tab_main.contract they are lost by the predicate since null = value is never true (or false).

    John

  • Migration of all the catalog items to a different data store in the same storage profiles

    Hello

    is any possibility to migrate everything in the catalog (time and iso files) to a different data store that has the same profile (Silver) storage group?  Because I have 2 groups of data store with the same profile of storage (Silver) and I want to delete one of this cluster.

    I found this kb: http://KB.VMware.com/selfservice/microsites/search.do?language=en_US & cmd = displayKC & externalId = 2058094 but it speaks solely of media files of migration between different storage profiles.

    Have vCD 5.6.4

    You happen to use rapid Provisioning?  This is probably the only problem I can think of.

    Environments that have no linked Clones or shadows created from them, you can just Storage vMotion them between the same storage policy data warehouses.  Just make sure that the data store or a store of data clusters are visible in vCloud Director first of all in the framework of this storage policy.

    When you use linked clones, I don't remember the exact process... I think that I have in my office somewhere (I'm at home now).

Maybe you are looking for

  • determine the end of the game wavefile

    I am writing a program to play the .wav file, and I want to know how to determine the end of the game wavefile. I use writing SO and begins to play. Thank you

  • Is it possible to accelerate from first Pro CC 2015 using metal API?

    Hi, I just upgraded Mac Pro (end 2013) double AMD over-pants D700 at OS X El Capitan of Mavericks.Is it possible to accelerate from first Pro CC 2015 using metal API? If Yes please tell me how to do it.Thank you.Dwarf

  • message of connection for Admins

    Under global settings, there is a place to put in a message before logon for customersIs there a setting to define a message for when someone connects to administrator display itself?

  • Atomos Shogun 4 K video does not work with the first

    Hi guys,.I bought the new Atomos Shogun. It works fine with my Sony A7s, but I can´t matter first Clips I did with her.A I made a mistake, or is it just a firmware issue?Thank you

  • After effects CC will not be updated

    HelloAfter effects CC will be not updated on my two computers.Whenever I try to install the update to the CC of the EI, the installer asks me to close AdobeCrashDaemon to continue.After quiting AdobeCrashDaemon and activity monitor to audit to ensure