Where statement on two different tables with same column name

Hello,
I have 2 financial tables:
tblincome, tblexpenses
in each table I have column name "monthPayed" (have values of all the months of the year).
I would like to create a balance view table that will show me the financial status for the Q1 (for example).
I have a column totalIncome and totalExpended respectively.
I've create a view table that shows me the financial balance at the moment but I want it to be devide to Quarters of the year...
Regards

 
Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
This is minimal polite behavior on SQL forums. Where is the code you already tried? Or are you so lazy, so rude or so privileged that you did not do anything for yourself? 
In fact that silly “tbl-” prefix is so bad that it has a name! It is called Tibbling and Phil Factor even wrote a humor article on bad programmers that use it. 
Your narrative is vague; it sounds like this is the DDL: 
CREATE TABLE Incomes
(payment_month CHAR(10) NOT NULL PRIMARY KEY,
 income_amt DECIMAL(12,2) NOT NULL
  CHECK (income_amt > 0.00),
CREATE TABLE Expenses
(payment_month CHAR(10) NOT NULL PRIMARY KEY,
 expense_amt DECIMAL(12,2) NOT NULL
  CHECK (expense_amt > 0.00),
>> in each table I have column name "monthPayed" (have values of all the months of the year). <<
I hope not! 2014 has not gotten to September, November or December yet! And the ISO-11179 data element name should be “payment_month”; but it is still wrong! An expense is not a payment! An income is not a payment! 
>> I would like to create a balance view table that will show me the financial status for the Q1 (for example). <<
Report Period Table
Since SQL is a database language, we prefer to do look ups and not calculations. They can be optimized while temporal math messes up optimization. A useful idiom is a report period calendar that everyone uses so there is no way to get disagreements in the DML.
The report period table gives a name to a range of dates that is common to the entire enterprise. 
CREATE TABLE Something_Report_Periods
(something_report_name CHAR(10) NOT NULL PRIMARY KEY
   CHECK (something_report_name LIKE <pattern>),
 something_report_start_date DATE NOT NULL,
 something_report_end_date DATE NOT NULL,
  CONSTRAINT date_ordering
    CHECK (something_report_start_date <= something_report_end_date),
etc);
These report periods can overlap or have gaps. I like the MySQL convention of using double zeroes for months and years, That is 'yyyy-mm-00' for a month within a year and 'yyyy-00-00' for the whole year. The advantages are that it will sort with the ISO-8601
data format required by Standard SQL and it is language independent. The pattern for validation is '[12][0-9][0-9][0-9]-00-00' and '[12][0-9][0-9][0-9]-[01][0-9]-00'
Now figure it out for yourself, show us what effort you put into this, then we will help you. 
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL

Similar Messages

  • Retrieving Data from different Tables with same tuple name

    Hi,
    I am made the following query from different tables. A tuple "name" is appearing in some tables. So when I run the qiery in a Java class, it delivers the same result of c.name, bpl.name and p.name. The result of c.name is correct, but the other 2 names are overwritten. It works perfect in a postgreSql query tool. How can I correct it, plz?
    SELECT c.ad_client_id, c.name, o.c_order_id, o.ref_order_id, bp.name, bpl.name, o.dateordered, o.datepromised, od.c_orderline_id,p.m_product_id,p.name, cur.iso_code, od.qtyordered
    FROM adempiere.ad_client c, adempiere.c_order o, adempiere.c_orderline od, adempiere.c_bpartner bp, adempiere.m_product p, adempiere.c_bpartner_location bpl, adempiere.c_currency cur
    WHERE c.ad_client_id =11 and c.ad_client_id = o.ad_client_id and bp.c_bpartner_id=o.c_bpartner_id and o.c_order_id = od.c_order_id and od.m_product_id = p.m_product_id and o.c_bpartner_location_id =bpl.c_bpartner_location_id and o.c_currency_id=cur.c_currency_id;
    Cheers

    Hi,
    create alias, if u have similar field names as below. Use the alias name (rs.getString("cname") and rs.getString("bpname") and so on ) to retrive data.
    SELECT c.ad_client_id, c.name as cname, o.c_order_id, o.ref_order_id, bp.name as bpname, bpl.name as bplname, o.dateordered, o.datepromised, od.c_orderline_id,p.m_product_id,p.name as pname, cur.iso_code, od.qtyordered
    FROM adempiere.ad_client c, adempiere.c_order o, adempiere.c_orderline od, adempiere.c_bpartner bp, adempiere.m_product p, adempiere.c_bpartner_location bpl, adempiere.c_currency cur
    WHERE c.ad_client_id =11 and c.ad_client_id = o.ad_client_id and bp.c_bpartner_id=o.c_bpartner_id and o.c_order_id = od.c_order_id and od.m_product_id = p.m_product_id and o.c_bpartner_location_id =bpl.c_bpartner_location_id and o.c_currency_id=cur.c_currency_id;Regards,
    Ram

  • View the tables with same column name

    Hi all
    I have 10-20 tables and they have some same column names
    How can I know it?
    I mean, I want to know the tables which have the common column names
    Thanks...

    SQL> break on column_name
    SQL> set linesize 1000
    SQL> set pagesize 10000
    SQL> select column_name, owner, table_name
      2  from (select owner, table_name, column_name, count(*) over (partition by column_name) ct
      3        from dba_tab_columns)
      4  where ct>1
    SQL> /
    COLUMN_NAME                    OWNER                          TABLE_NAME
    AADSAS_ID_NBR                  H89UCBAC                       PS_SAD_ADA_CD
                                   H89UCBAC                       PS_SAD_ADA_SUS
                                   H89UCBAC                       PS_SAD_ADA_TMP
    AA_CODE                        H89UCBAC                       PS_RQ_CONDIN_SLVW
                                   H89UCBAC                       PS_RQ_CONDIN_SRCH
                                   H89UCBAC                       PS_DUMMYDESCR_LANG
                                   H89UCBAC                       PS_DUMMY_DESCR
                                   H89UCBAC                       PS_RQ_NOTINCOND_LV
                                   H89UCBAC                       PS_RQ_NOTINCOND_SR
    [...]Nicolas.

  • Creating Keyboard shortcut for two different actions with same menu name..

    Am using soundforge pro .. I have to process nearly 1000 audio files, and want to create shortcuts for "Smooth"
    The problem is there are two Menu names named "Smooth"
    Fade In > Smooth
    Fade Out > Smooth
    I want to assign different shortcuts for each one.. Is it possible ?
    Any help is appreciated

    Hi,
    I would use IP Address range boundaries instead which I normally do anyway instead for the AD site.
    Regards,
    Jörgen
    -- My System Center blog ccmexec.com -- Twitter
    @ccmexec

  • How To Create Table View With Same Column name But Different Table?

    Hi All,
    I have the problem to create a tableview with same column name but in different table.
    The Table that i have:-
    Table - PAC051MPROFORMA
    Column - mrn,visitid
    Table - PAC051TPROFORMA
    Column - mrn,visitid
    Table - PAC052MTRANSBILL
    Column - mrn,visitid
    Then i want to create a table view to view that table. This is my SQL
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    That SQL Return this error = ORA-00957: duplicate column name
    Then I modify that SQL to
    CREATE VIEW pacviewproforma (mrn,visitid)
    As Select PAC051MPROFORMA.mrn,PAC051MPROFORMA.visitid,PAC051TPROFORMA.mrn,PAC051TPROFORMA.visitid,PAC052MTRANSBILL.mrn,PAC052MTRANSBILL.visitid
    where
    *(a.PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)*
    and
    *(a.PAC051TPROFORMA.mrn=PAC052TRANSBILL.mrn)*
    This time this error return = ORA-01730: invalid number of column names specified
    What should i do?
    Thanks...

    Hi,
    SQL> CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    CREATE VIEW pacviewproforma (mrn,visitid,mrn,visitid,mrn,visitid)
    ERROR at line 1:
    ORA-00957: duplicate column namePlease give different names to each column.
    Something like this..
    SQL> CREATE OR REPLACE VIEW pacviewproforma (MPROFORMA_mrn,MPROFORMA_visitid,TPROFORMA_mrn,TPROFORMA
    _visitid,MTRANSBILL_mrn,MTRANSBILL_visitid)
      2  As Select
      3  PAC051MPROFORMA.mrn,
      4  PAC051MPROFORMA.visitid,
      5  PAC051TPROFORMA.mrn,
      6  PAC051TPROFORMA.visitid,
      7  PAC052MTRANSBILL.mrn,
      8  PAC052MTRANSBILL.visitid
      9  from PAC051MPROFORMA,PAC051TPROFORMA,PAC052MTRANSBILL
    10  where
    11  (PAC051MPROFORMA.mrn=PAC051TPROFORMA.mrn)
    12  and
    13  (PAC051TPROFORMA.mrn=PAC052MTRANSBILL.mrn);
    View created.
    SQL> DESC  pacviewproforma;
    Name                                      Null?    Type
    MPROFORMA_MRN                                      NUMBER
    MPROFORMA_VISITID                                  NUMBER
    TPROFORMA_MRN                                      NUMBER
    TPROFORMA_VISITID                                  NUMBER
    MTRANSBILL_MRN                                     NUMBER
    MTRANSBILL_VISITID                                 NUMBER
    ORA-01730: invalid number of column names specifiedThe list of column nmae you specified during the CREATE VIEW should match with the SELECT list of the view.
    Twinkle

  • Get the Common from Two Internal Tables with same structure

    Hi ,
    I need to get the Common data from Two Internal Tables with same structure with using the looping method.
    For e.g.
    I have two internal table say ITAB1 and ITAB2.
    ITAB1 has values A,B,C,D,E,F
    ITAB2 has values A,H,B,Y,O
    Output at runtime should be : A,B

    Hi mohit,
    1. If u want to compare all fields,
       for matching purpose,
       then we can do like this.
    2.
    report abc.
    data : a like t001 occurs 0 with header line.
    data : b like t001 occurs 0 with header line.
    loop at a.
      LOOP AT B.
        IF A = B.
          WRITE :/ 'SAME'.
        ENDIF.
      endloop.
    ENDLOOP.
    regards,
    amit m.

  • Deleting from multiple tables where few tables have same column name

    Hi,
    I am new to PL/SQL and need some help. I need to delete data older then X years from some 35 odd tables in my schema and out of those tables 25 tables have same column name on which i can have my "where" clause and rest 10 table have different table names. I am doing something like this :
    declare
    table_list UTL_FILE.FILE_TYPE;
    string_line VARCHAR2(1000);
    tables_count number:=0;
    table_name VARCHAR2(400);
    column_name VARCHAR2(400);
    BEGIN
    table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
    DBMS_OUTPUT.PUT_LINE(table_list);
    LOOP
    UTL_FILE.GET_LINE(table_list,string_line);
    table_name := substr(string_line,1, instr(string_line,'|')-1);
    column_name := substr(string_line, instr(string_line,'|')+1);
    DBMS_OUTPUT.PUT_LINE(table_name);
    DBMS_OUTPUT.PUT_LINE(column_name);
    IF column_name = 'SUBMISSION_TIME' THEN
    delete from :table_name where to_date(:column_name)<(sysdate-(365*7));
    ELSE
    delete from || table_name || where ( || to_date(column_name) || ) <(sysdate-(365*7));
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    UTL_FILE.FCLOSE(table_list);
    DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
    UTL_FILE.FCLOSE(table_list);
    END;
    WHERE the text file "text7.txt" contains list of table name and column names separated by a pipe line. But when I execute the above proc it gives error "invalid table name".
    Can something like this be done or is there any other way to execute this task of deletion from 35 tables.
    Thanks.

    Thanks for replies. I don't know what I am doing wrong but still not getting this damn thing work...This is the proc i am running now :
    declare
    table_list UTL_FILE.FILE_TYPE;
    string_line VARCHAR2(1000);
    tables_count number:=0;
    table_name VARCHAR2(4000);
    column_name VARCHAR2(4000);
    code_text VARCHAR2(2000);
    BEGIN
    table_list := UTL_FILE.FOPEN('ORALOAD','test7.txt','R');
    LOOP
    UTL_FILE.GET_LINE(table_list,string_line);
    table_name := substr(string_line,1, instr(string_line,'|')-1);
    column_name := substr(string_line, instr(string_line,'|')+1);
    IF column_name = 'SUBMISSION_TIME' THEN
    DBMS_OUTPUT.PUT_LINE('do nothing');
    ELSE
    code_text:= 'begin delete from'|| (table_name) ||'where to_date' || (column_name) || '<(sysdate-(365*7))';
    Execute Immediate code_text;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    UTL_FILE.FCLOSE(table_list);
    DBMS_OUTPUT.PUT_LINE('Number of Tables processed is : ' || tables_count);
    UTL_FILE.FCLOSE(table_list);
    END;
    But it gives following error :
    " ORA-06550: line 1, column 51:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 1, column 68:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    ORA-06512: at line 22 "

  • How can I combine post to two different tables with one form?

    I am trying to create a "phantom" record in a table to be used later in a report. How can I create a form and properly $_POST to two different tables? Thanks for any suggestions!

    In POST processing, just do the insert to one table, followed by the insert to the second table. I don't understand where you are getting stuck.
    Sometimes when we do an insert, we need the auto-generated ID from the newly created record as a "foreign key" for the record created in the second insert. MySQL has a nifty solution for that. The specific code depends on whether you are using the mysql, mysqli or PDO database connection.

  • Requesting license for two different ssystem with same SID

    Hello,
    Is it possible to request 2 license for two systems with same SID. The systems are on different machines and their HW key are different but both have same SID. While requesting license, will it permit to create 2 different license with SAME SID.
    Regards
    Deb

    Hi Anil,
    The one for which the license is already requested is the main development portal with SID EP2. I have installed one local version of SAP EP with the same SID EP2. Now we need a license for the second system.
    If we change the HW key of the original license which is already applied in the main development portal under SMP and apply for a new license for the new local version, can it have any future implications, if any.
    What is the best way to deal with the situation. Is there a full proof way to change the SID of the EP system, which I can try in the local EP system.
    Regards
    Deb

  • One target table is loading from two different source but same columns but one source is in a database and other is in a flat file.

    Hope you all are doing good.
    I have a business issue to be implemented in ODI 11G. Here it is. I am trying to load a target table from two sources having same coulmn names. But one source is in file format and other is in Oracle Database.
    This is what i think i will create two mappings in the same interface using Union between the sources. But i am not sure how the interface would connect to different logical architecture to connect to two different sources.
    Thanks,
    SM

    You are on the right track, this can all be done in a single interface. Do the following
    1) Pull your file data model into the source designer and and your target table model to the target pane.
    2) Map all the relevant columns
    3) In the source designer create a new dataset and choose the UNION join type (this will create a separate tab in the source designer pane)
    4) Select the new dataset tab in the source designer pane and pull your source oracle table data model into the source designer. Map all the relevant columns to the target
    5) Make sure that your staging location is defined on a relational technology i.e. in this case the target would be an ideal candidate as that is where ODI will stage the data from both file and oracle source and perform the UNION before loading to the target
    If you want to look at some pretty screenshots showing the steps above take a look at http://odiexperts.com/11g-oracle-data-integrator-part-611g-union-minus-intersect/

  • How to work with two different backend with same MI Server and war file

    Hi All,
    We have a requirement that we need to work with one Middleware for two backends. For that we had to copy MAM30 sync bo's to zsync BO'S with the name ZMAM30. Now both sync BO'S will point to different backends.
    I have a standard war file which was working well with standards sync bo's. Now to work on zsync bo's what all the changes do I have to do in the standard war file(code).
    As per my knowledge we have a file called "syncbonamelist.properties" which maps the sync bo keys. Also there is another file called "mapping.xml" file which maps the package name with BO name.
    Can any body please tell me, are there any other files needed to be change like "meRepMeta.xml", other than any existing code like java objects are also needed to be changed.
    Your help in this regard is highly appreciable.
    Regards
    Murthy

    Hi Murthy,
    I try to get my head around the question:WHY?
    The reason for my question is, that this influences the answer!
    Because of several reasons it is NOT possible to handle MAM and zMAM Bos at the SAME TIME on the SAME MACHINE in the way you describe it - and it makes no sence to do so at all! But anyway......
    Lets say you have two backends, cause you have two different areas of the company. But both want to use the same MI server - but the client should be independend.
    So you need two apps. One uses the MAM BOs and the second one uses the zMAMBos.
    If this is the case, dev should be straight forward I think and you solution should work already......... so I ask myself, what is the problem you have? Do you get an error?
    - First create a new MEREPMETA-XML with just the zMAMBOs instead of the MAM BOs.
    - Change the two files you mentioned above.
    This should be all then.
    If you have a look into the implementation for MAM001Impl for example, there you find a line like:
         private static final String SYNC_BO_NAME
              = ResourceBundle.getBundle("com.sap.mbs.mam.bo.impl.syncbonamelist").getString("MAM30_040");
    This takes the name from the properties file and maps it to the real BO. So changing the name in the property file to
    MAM30_040 = zMAM30_040
    will result in MAM uses the zMAM BOs.
    Be aware: after you place the WAR file in the WEBAPPS folder and do a restart to deploy the file, you need to do a data reset to make sure the new MEREPMETA.XML is read.
    AND: two apps! one for MAM and one for zMAM BOs. One APP is not possible! Cause if you have something like that in the properties file:
    MAM30_040 = MAM30_040
    MAM30_040 = zMAM30_040
    if will only take the first reading.
    But I think this is clear to you anyway
    Regards,
    Oliver

  • Problem in importing two different classes with same name...

    I have to import two different classes in my program with the same name....
    import org.apache.lucene.document.Document;
    import org.w3c.dom.Document;
    //    I AM USING THE DOCUMENT FROM W3C PACKAGE HERE....
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     InputSource is = new InputSource( new StringReader( tempString ) );
                     d = builder.parse( is );
                     NodeList images = d.getElementsByTagName("img");
                     int length = images.getLength();
                     for(int i = 0;i<length;i++)
                         Node image = images.item(i);
                         String tempAltText = image.getAttributes().getNamedItem("alt").getNodeValue();
                         altText = altText.concat(" ").concat(tempAltText);
                     }and the error i am getting is
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
        [javac] import org.w3c.dom.Document;
        [javac] ^
        [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:132: incompatible types
        [javac] found   : org.w3c.dom.Document
        [javac] required: org.apache.lucene.document.Document
        [javac] d = builder.parse( is );
        [javac] ^
        [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:133: cannot find symbol
        [javac] symbol  : method getElementsByTagName(java.lang.String)
        [javac] location: class org.apache.lucene.document.Document
        [javac] NodeList images = d.getElementsByTagName("img");
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 3 errorsany idea ..how to resolve it
    Edited by: ping.sumit on Jul 16, 2008 3:39 PM
    Edited by: ping.sumit on Jul 16, 2008 3:40 PM

    now i changed the code to
    import org.apache.lucene.document.Document;
    import org.w3c.dom.Document;
    org.w3c.dom.Document d = null;
    try{
         System.out.println("in author");
                   URL url = new java.net.URL(urlString);
                   java.net.URLConnection conn = url.openConnection();
                   BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   while ((in.readLine()) != null)
                        //tempString = tempString.concat(in.readLine());
                        String temp = in.readLine();
                        tempString = tempString + " " + temp;
                   System.out.println("the string in author" + tempString);
                    in.close();
                    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     InputSource is = new InputSource( new StringReader( tempString ) );
                     d = builder.parse( is );
                     NodeList images = d.getElementsByTagName("img");and their is only one error i am getting ...and that is
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
        [javac] import org.w3c.dom.Document;
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 1 error

  • Two fact tables with same dimensions

    Good Morning,
    I am just assigned to a new project. This is my first maintenance request: two fact tables F1 and F2 that shares same set of dimemsion tables D1 and D2. In the Answers report, if I use a foreign key in either F1 or F2, for example F1.k1, I get an error of meta data inconsistency. But if I use same column from dimension table D1.k1, then no error.
    Your help is very much appreciated.
    May

    This is proberly #3 on the most popular topics list, behind SSO and a variables. Please use the search, what you need to do to set up conformed dimensions with multiple facts in the same report has been covererd many times.

  • Different cpuspeednw on two different hosts with same cpu config. Why?

    Hi,
    there are two hosts.
    They are different, but have same CPU configuration (I guess it from the output below).
    Host1: Solaris 10, 4 cpu, 4 core in each cpu.
    psrinfo -v
    Status of virtual processor 0 as of: 03/04/2010 08:57:45
    on-line since 12/25/2009 11:03:23.
    The i386 processor operates at 2133 MHz,
    and has an i387 compatible floating point processor.
    Status of virtual processor 15 as of: 03/04/2010 08:57:45
    on-line since 12/25/2009 11:03:25.
    The i386 processor operates at 2133 MHz,
    and has an i387 compatible floating point processor.
    Host2: CentOS 5.3. Also 4 cpu, 4 cores in each spu
    cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 15
    model name : Intel(R) Xeon(R) CPU E7320 @ 2.13GHz
    stepping : 11
    cpu MHz : 2133.413[b]
    cache size : 2048 KB
    physical id : 0
    siblings : 4
    core id : 0
    cpu cores : 4
    apicid : 0
    fpu : yes
    fpu_exception : yes
    cpuid level : 10
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca c
    mov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constan
    t_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips : 4270.09
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    processor : 15
    vendor_id : GenuineIntel
    cpu family : 6
    model : 15
    model name : Intel(R) Xeon(R) CPU E7320 @ 2.13GHz
    stepping : 11
    cpu MHz : [b]2133.413
    cache size : 2048 KB
    physical id : 6
    siblings : 4
    core id : 3
    cpu cores : 4
    apicid : 27
    fpu : yes
    fpu_exception : yes
    cpuid level : 10
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
    bogomips : 4266.82
    clflush size : 64
    cache_alignment : 64
    address sizes : 40 bits physical, 48 bits virtual
    QUESTION:
    Host1 (Solaris) has cpuspeednw = 700
    Host2 (CentOS) has cpuspeednw = 1700
    WHY?
    What should I do to find out why this is happening?
    Edited by: user10944480 on Mar 14, 2010 7:22 AM
    Edited by: user10944480 on Mar 14, 2010 7:24 AM

    user10944480 wrote:
    QUESTION:
    Host1 (Solaris) has cpuspeednw = 700
    Host2 (CentOS) has cpuspeednw = 1700
    WHY?
    What should I do to find out why this is happening?
    The CPUSPEEDNW is measured in "millions of Oracle operations per second" - but we don't know what "operation" Oracle is using for measuring. Since you have two difference operating systems, it's possible that the "operation" that Oracle uses is one that makes use of the "OSD" (operating system dependant) code and has a very different code path on the two machines that results in a very different speed of completion.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    There is a +"Preview"+ tab at the top of the text entry panel. Use this to check what your message will look like before you post the message. If it looks a complete mess you're unlikely to get a response. (Click on the +"Plain text"+ tab if you want to edit the text to tidy it up.)
    +"Science is more than a body of knowledge; it is a way of thinking"+
    +Carl Sagan+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Same query takes different time for two different users with same privileges

    Hi,
    Just wanted to know if it is possible for an INSERT query to take different amount of time for two different users for the same volume of data. If so, what could be the reason? I would like to add that we are not executing the query simultaneously. But it is always faster for user1(within 10-20 seconds) and slower for user2(takes around 8-10 minutes).

    Show execution plan for each user. I think there is other reasons which you didn't not tell

Maybe you are looking for

  • Configuration issue on 1231G AP

    Hi, I configured one vlan and trying to authenticate it through radius server.My objective is when a internal users want to connect through this SSID they just put username and password and authenticate through Radius server. Another vlan is getting

  • Report in cats

    Is there any report in CATS for retrival of data of records with all status in CATSDB

  • RWB AE - display synchronous payload

    Hi all, I would like to see the payload of synchronous messages in Adapter Engine. Using RWB I display only the payload of asynchronous but not of synchronous. Do you have any suggestions? Thanks Janos.

  • Performance: Importing Items

    Hi, I have a custom database, which has the information about items. I need to get the data from that database (perform some transformations) and create new items in SAP. I'm using DI API, and it takes me around 3-4 seconds to create each item. (I ha

  • Custom transactions execution from base on conifguration table entry.

    Hello, I have a reqiurement where I name of the custom Transaction programs are maintained in a configuration table. I am creating a custom report on whose execution, the selection screen should show the name name of all those transaction proigrams i