Strange query plans, and so different results from a view.

In my database (11g), I have a currency exchange rate table, which contains all currencies and their exchange rate to USD. I need to have a number of different exchange rates - To GBP, EUR, etc...
To accomplish this I have created a view, which has one union statement of all the USD exchange rates, with the same data joined back on itself to give the exchange rates based on their exchange rate to USD - ie: SELECT b1.Date, b1.Currency AS FromCurrency, b2.Currency as ToCurrency, b1.Rate/b2.Rate as Exchange Rate FROM Rates b1, Rates b2 on b1.Date = b2.Date
This view works fine when I query it, and returns the data as I expect.
I have a second view that is joined to this view to give a return of the amount in each currency for reporting. This view seems to work correctly when I narrow down the search requirements and have a small set of data.
The issue I am having is when I query the second view and get it to return all the data. Instead of receiving 4 rows per transaction (I am only interested in 4 exchange rates for display) I typically receive up to 2 rows. The first record is for the conversion to USD, the second record is for the conversion to the supplied currency. The issue is that this exchange rate actually includes the aggregate for all 3 other requested currencies (not the USD).
So instead of getting something like:
Amt RC BC (Amt = Amount, RC = Reporting Currency. BC = Base Currency)
60 GBP GBP
80 EUR GBP
100 USD GBP
1000 ZAR GBP
60 GBP USD
80 EUR USD
100 USD USD
1000 ZAR USD
I get the following set of results:
1140 GBP GBP
100 USD GBP
100 USD USD
Has anyone come accross something similar or have any ideas on how I can resolve this?
Thanks
PS: I can get both sets of results from the same view depending on the filter criteria. Also if I convert the exchange rates into a table, it then returns the correct results as expected.

943081 wrote:
The idea is to seek help in solving the problem. I was hoping that perhaps someone had experienced the same thing - different results for "effectively" the same query:Well, that's the issue... without additional info, it's not clear what issue you were seeing.
SELECT * FROM view WHERE Date = '01 January, 2012'
verse
SELECT * FROM view WHERE Date > '31 December, 2011' ORDER BY DateNow it's a bit clearer. That second query is not "effectively" the same as the first query. If the date column is in DATE format, then you ought to have a to_date() around the date string to explicitly convert it into a date so you can do date-to-date comparisons correctly. Also, DATE datatype stores times as well as dates, so asking for data matching midnight of a specific date is different than asking for data greater than midnight of the previous day.
If the date string is a string, then ... well, the string "31 December 2011" is greater than the string "31 August 2013", despite it being an earlier date. This is why making sure you're using the right datatype for the job is important - a date is different to a string that just happens to contain a date.
DateID
I have no objection to using a Date but always struggle to understand what someone means when they tell me "06/07/2012" - granted if the day is above 12 or the same day and month I don't have a problem - but it still leaves 121 days a year that are confusing. sure, but just because you find outputting the display (or rather, someone else's output) confusing doesn't mean you still shouldn't use the correct datatype. Store things as a date, and you can then output it in whatever format you like. Try doing that with a string or a number.
Don't say it doesn't happen as I got a birthday card from a company in May this year when I have specifically entered my date of birth as being the 5 of a month (name drop down box on their website)!Just because someone else doesn't understand how to work with dates correctly doesn't mean you can't! It's not exactly rocket science, after all!*{;-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Different Results From V$Rman_Backup_job_details  and V$Rman_Status

    Does anyone know why I would get different results from V$Rman_Backup_job_details and V$Rman_Status on the same instance?
    Image of Quries: www.hydell.com/OracleBackupDifferences.png
    Dates Returned For Latest Backup
    V$Rman_Status = 10/13/2011
    V$Rman_Backup_job_details = 7/24/2011
    Which view is the best to use for monitoring backups?
    Thanks in advance for the help.
    Rob

    oracle.dba.89 wrote:
    Please show the script and that might help look into this. Also the timezone of the OS shows EST. And cron shows the scheduled time at 12hrs. It should run at 12:00 EST hours and not GMT.
    Also please post output for below queries. Are backups run from the same node? (If RAC)
    select value from dba_scheduler_global_attribute where attribute_name = 'DEFAULT_TIMEZONE';
    Hi,
    This is the backup script
    #Set Variables
    ORACLE_HOME=/projects1/oramroprod/oracle/product/10.2.0/db_4
    ORACLE_SID=MROPROD
    PATH=$PATH:$ORACLE_HOME/bin
    btype="FULL"
    RMAN_BACKUP_LOC=/data1/RMAN/MROPROD
    export ORACLE_HOME
    export ORACLE_SID
    export PATH
    export btype
    tag="$ORACLE_SID"_"$btype"
    #Print commands and their arguments as they are executed
    set -x
    SDATE=`date +%m%d%y`
    STIME=`date +%H%M%S`
    DD=`date +%d%m%y`
    #Create daily backup directories
    mkdir -p $RMAN_BACKUP_LOC/datafiles_backup/bkp_${DD}
    mkdir -p $RMAN_BACKUP_LOC/controlfile_backup/bkp_${DD}
    mkdir -p $RMAN_BACKUP_LOC/arch_backup/bkp_${DD}
    mkdir $RMAN_BACKUP_LOC/logs
    #Take backup
    rman target / nocatalog log=$RMAN_BACKUP_LOC/logs/rman_${btype}_backup_${SDATE}_${STIME}.log << EOF1
    change archivelog all crosscheck;
    run {
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;
    backup as compressed backupset incremental level 0 database tag '$tag' format '$RMAN_BACKUP_LOC/datafiles_backup/bkp_${DD}/%d_%s_%p';
    backup as compressed backupset archivelog all not backed up 1 times FORMAT '$RMAN_BACKUP_LOC/arch_backup/bkp_${DD}/ARCH_%d_%s_%p';
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO  '$RMAN_BACKUP_LOC/controlfile_backup/bkp_${DD}/%F';
    delete noprompt obsolete;
    delete noprompt archivelog all completed before 'sysdate-2';
    EXIT;
    EOF1
    This is not RAC.
    SQL> select value from dba_scheduler_global_attribute where attribute_name = 'DEFAULT_TIMEZONE';
    VALUE
    GMT

  • Execute the same query twice, get two different results

    I have a query that returns two different results:
    Oracle Version : 10.2.0.1.0
    I am running the following query on the Oracle server in SQL*Plus Worksheet.
    SELECT COUNT(*)
    FROM AEJOURNAL_S1
    WHERE CHAR_TIME BETWEEN TO_DATE('12-AUG-10 01:17:39 PM','DD-MON-YY HH:MI:SS AM') AND
    TO_DATE('13-AUG-10 14:17:34','DD-MON-YY HH24:MI:SS')
    AND DESC2 LIKE '%'
    AND DESC1 LIKE '%'
    AND DESC2 LIKE '%'
    AND ETYPE LIKE '%'
    AND MODULE LIKE '%'
    AND LEVELL = '11-WARNING'
    ORDER BY ORDD DESC;
    The very first time the query is run, it will return a count of 259. The next time the query is run, lets say, 10 seconds later, it will return a count of 260. The above query is exemplary of the kind of thing I'm trying to do. It seems like the more fields filtered against '%', the more random the count return becomes. Sometime you have to execute the query three or four times before it levels out to a consistent number.
    I'm using '%' as the default for various fields, because this was the easiest thing to do to support a data-driven Web interface. Maybe I have to 'dynamically' build the entire where clause, instead of just parameterizing the elements and having default '%'. Anyway, to eliminate the web interface for the purpose of troubleshooting the above query was run directly on the Oracle server.
    This query runs against a view. The view does a transpose of data from a table.
    Below is the view AEJOURNAL_S1
    SELECT
    CHAR_TIME,
    CHAR_INST,
    BATCH_ID,
    MIN(DECODE(CHAR_ID,6543,CHAR_VALUE)) AS ORDD,
    MIN(DECODE(CHAR_ID,6528,CHAR_VALUE)) AS AREAA,
    MIN(DECODE(CHAR_ID,6529,CHAR_VALUE)) AS ATT,
    COALESCE(MIN(DECODE(CHAR_ID,6534,CHAR_VALUE)),'N/A') AS CATAGORY,
    MIN(DECODE(CHAR_ID,6535,CHAR_VALUE)) AS DESC1,
    MIN(DECODE(CHAR_ID,6536,CHAR_VALUE)) AS DESC2,
    MIN(DECODE(CHAR_ID,6537,CHAR_VALUE)) AS ETYPE,
    MIN(DECODE(CHAR_ID,6538,CHAR_VALUE)) AS LEVELL,
    MIN(DECODE(CHAR_ID,6539,CHAR_VALUE)) AS MODULE,
    MIN(DECODE(CHAR_ID,6540,CHAR_VALUE)) AS MODULE_DESCRIPTION,
    MIN(DECODE(CHAR_ID,6541,CHAR_VALUE)) AS NODE,
    MIN(DECODE(CHAR_ID,6542,CHAR_VALUE)) AS STATE,
    MIN(DECODE(CHAR_ID,6533,CHAR_VALUE)) AS UNIT
    FROM CHAR_BATCH_DATA
    WHERE subbatch_id = 1774
    GROUP BY CHAR_TIME, CHAR_INST, BATCH_ID
    So... why does the query omit rows on the first execution? Is this some sort of optimizer issue. Do I need to rebuild indexes? I looked at the indexes, they are all valid.
    Thanks for looking,
    Dan

    user2188367 wrote:
    I have a query that returns two different results:
    Oracle Version : 10.2.0.1.0
    I am running the following query on the Oracle server in SQL*Plus Worksheet.
    SELECT COUNT(*)
    FROM AEJOURNAL_S1
    WHERE CHAR_TIME BETWEEN TO_DATE('12-AUG-10 01:17:39 PM','DD-MON-YY HH:MI:SS AM') AND
    TO_DATE('13-AUG-10 14:17:34','DD-MON-YY HH24:MI:SS')
    AND DESC2 LIKE '%'
    AND DESC1 LIKE '%'
    AND DESC2 LIKE '%'
    AND ETYPE LIKE '%'
    AND MODULE LIKE '%'
    AND LEVELL = '11-WARNING'
    ORDER BY ORDD DESC;
    The very first time the query is run, it will return a count of 259. The next time the query is run, lets say, 10 seconds later, it will return a count of 260. The above query is exemplary of the kind of thing I'm trying to do. It seems like the more fields filtered against '%', the more random the count return becomes. Sometime you have to execute the query three or four times before it levels out to a consistent number.
    I'm using '%' as the default for various fields, because this was the easiest thing to do to support a data-driven Web interface. Maybe I have to 'dynamically' build the entire where clause, instead of just parameterizing the elements and having default '%'. Anyway, to eliminate the web interface for the purpose of troubleshooting the above query was run directly on the Oracle server.
    This query runs against a view. The view does a transpose of data from a table.
    Below is the view AEJOURNAL_S1
    SELECT
    CHAR_TIME,
    CHAR_INST,
    BATCH_ID,
    MIN(DECODE(CHAR_ID,6543,CHAR_VALUE)) AS ORDD,
    MIN(DECODE(CHAR_ID,6528,CHAR_VALUE)) AS AREAA,
    MIN(DECODE(CHAR_ID,6529,CHAR_VALUE)) AS ATT,
    COALESCE(MIN(DECODE(CHAR_ID,6534,CHAR_VALUE)),'N/A') AS CATAGORY,
    MIN(DECODE(CHAR_ID,6535,CHAR_VALUE)) AS DESC1,
    MIN(DECODE(CHAR_ID,6536,CHAR_VALUE)) AS DESC2,
    MIN(DECODE(CHAR_ID,6537,CHAR_VALUE)) AS ETYPE,
    MIN(DECODE(CHAR_ID,6538,CHAR_VALUE)) AS LEVELL,
    MIN(DECODE(CHAR_ID,6539,CHAR_VALUE)) AS MODULE,
    MIN(DECODE(CHAR_ID,6540,CHAR_VALUE)) AS MODULE_DESCRIPTION,
    MIN(DECODE(CHAR_ID,6541,CHAR_VALUE)) AS NODE,
    MIN(DECODE(CHAR_ID,6542,CHAR_VALUE)) AS STATE,
    MIN(DECODE(CHAR_ID,6533,CHAR_VALUE)) AS UNIT
    FROM CHAR_BATCH_DATA
    WHERE subbatch_id = 1774
    GROUP BY CHAR_TIME, CHAR_INST, BATCH_ID
    So... why does the query omit rows on the first execution? Is this some sort of optimizer issue. Do I need to rebuild indexes? I looked at the indexes, they are all valid.
    Thanks for looking,
    DanIn fact you the first time you ran the query the data has been retrived from disk to memory , in the second time the data is already in memory so the respnse time should be faster ,but if you chagne any condition or column or letter case the optimizer will do the first step (data will be retrived from disk to memory )

  • Different results from all_objects

    Can someone please explain me,
    How it is possible to get different results from "all_objects", once I query it from "SQL Worksheet" and next time when I execute the procedure with the same query ?
    The procedure is created by schema user (owner) and it's executed by it.
    Same as the query.
    I am querying for objects which belongs to other owners.
    Is there a way how to trace which privileges are used for querying the "all_objects" ?
    Any hint will be very welcomed ?

    You are correct, sorry.
    Oracle 11g EE 11.2.0.1.0 - 64bit Production on Windows 2K8
    I already lost my whole day, probably I will lost the weekend, too.
    Here is the sample code:
    CREATE OR REPLACE PROCEDURE PROCEDURE1 AS
    BEGIN
    FOR c IN (SELECT object_name from all_objects d
    WHERE d.owner IN ('DWH_CM')
    LOOP
    dbms_output.put_line(c.object_name);
    end loop;
    END PROCEDURE1;
    Test
    exec procedure1;
    -- does not write anything in output and it is enabled
    select object_name
    from all_objects O
    WHERE o.owner IN ('DWH_CM');
    -- returns 99 rows
    Edited by: user9377205 on Aug 6, 2010 9:06 AM

  • Why do I get two different results from the same coefficients?

    I am getting two different results from the Polynomial Evaluation function.
    For the first one, I am getting the coefficients from a Polynomial Fit function.  I feed the coefficients from the Fit function into the Poly Eval function and get the correct result of 12.8582 when I evaluate 49940.
    For the second one, I create constant array of the SAME values that were returned from the Polynomial Fit function (i typed them in).  However, I am getting an incorrect result of -120.7913 when I feed the constant array into the Poly Eval function when I evauate 49940.
    How can this happen when I am using the same array values?
    Attached is an image of what I am explaining.
    Solved!
    Go to Solution.
    Attachments:
    polynomial_evaluation.jpg ‏213 KB

    Hi Altran,
    are you sure about using the "same" coefficients?
    Did you compare them? Did you (atleast) set the display properties to 17 significant digits?
    Please attach a VI instead of a picture...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Select statement returns different results from 9i and 10g

    Hi all,
    Would appreciate if someone could help to solve this puzzle here:
    I have the exact the statements running on Oracle 9i and 10g, why do they return different results?
    Select unique(GroupDesc) , GroupSeq from Module where ModuleId in (Select ModuleId from User_Access where UserId='admin') and Status='A'
    In Oracle 9i:
    Both columns returned as follows...
    GroupDesc | GroupSeq
    In Oracle 10g:
    Only one column returned, the column with unique keyword was missing...
    GroupSeq
    Could anyone enlighten me?

    yes, the table structure... actually the CREATE TABLE statement...
    with some sample data (INSERT INTO)
    and the actual queries (both of them - copy-paste them from each separate environment)
    you can use tags around the statements this will format it to a fixed font - making it easier to read
    Edited by: Alex Nuijten on Feb 20, 2009 10:05 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Different results from MAX and Labview

    Hi all,
    We did an impact testing a couple of days ago, and I got very big acceleration (the peak is about 300g, which is much larger than the estimated value).
    And then I tried a small imact test in the lab using a steel plate which is less than 1 lb to impact a steel ruler, I still got big peak number (more than 200g, which is impossible). And then I tried the small impact test again by using MAX, the peak number is about 12g, and the curve seems like pretty reasonable. I was wondering why I got different results by using MAX and Labview?
    Also, sometimes when I connect the SCXI-1001 to the computer, it says the USB is malfuntion and cannot be recgonized by the computer, and turns out the driver file does not exists. But most of the time, it works very well and the driver file does exists. Why this happened?
    Thanks.
    Yuan

    jyuan wrote:  but I want to clike one "run button" and get data from strain gage, LVDT, accelerometer at the same time and our tesing duration is just about a few seconds. And also I didn't find a place where I can record the data in MAX
    You can do that.  A task can only have the same types of inputs, meaning Analog Input, Analog Output, Digital Input, Digital Output, etc.  Different sensors are just read with Analog Inputs.  So they all can be in the same task.  In MAX, just set up a task a configure each channel as it should be.  Then use that single task in your LabVIEW code.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Different results from SQLPlus and ResultSet

    Hello!
    I'm using Oracle Server and when I query in SQL-Plus:
    "select count(*) from table1", I get the result "2 rows"
    But - when I query in JDBC:
    PreparedStatement pstmt = dbconn.prepareStatement(same query....);
    pstmt.executeQuery();
    rset=pstmt.getResultSet();
    rset.next ();
    rset.getString (1)
    Returns only "1 row"...
    In addition, when I query for "select * from table1", in JDBC, I get as results only from the 2nd record to the last..."
    In all cases, for some reason, it truncate the first row! :-(
    Why is there a difference between them?
    Thank you all in advance!

    rset.getString (1)If you are doing "select count(*)" that should be getInt(1).
    pstmt.executeQuery();
    rset=pstmt.getResultSet();Try "rset = pstmt.executeQuery()" instead of those two lines. That is the usual way of doing it.
    PreparedStatement pstmt = dbconn.prepareStatement(same query....);Show us the prepareStatement call with the SQL query. Don't edit it in any way, don't abbreviate it, don't even remove a single space in it, copy&paste it exactly the way it is.

  • Strange case! Report ran report runtime gave different result from reoprt builder

    Hi all,
    I have a report which was developed with developer/2000 R1.6. I used it for generating monthly report to user for more than a year.
    Recently, I converted it to R2.1 and used it. However, strange thing happened, It gave correct result in report builder, but when I generated the rep file, and ran it in runtime, it gave wrong result. The report figures were wrong, and it had more pages than the correct one.
    I also converted others reports, but they are ok, only this one that I cannot run it runtime because of this.
    I don't think anyone would have experienced the same case before, so I think that I am helpless. I just want to my strange experience to you all.
    Vanessa

    I suspect you have a stronger path somewhere else to the wrong report. Check your registry and search all your accesible drives for filenames that are called the same name.

  • To_char(adate,'dd.mm.yyyy')   returns different results  from  two oracle clients !!! Is it  possible?

    Dear all;
    We have only one Database server with some IIS's   as web servers on front . Each web server has own oracle client software in order connect to central database..
    The same following query used in C#  code  returns different results on each IIS server.(3 row, or  not data found )
    why?
    select     *    from    aTable    where        to_char( adate ,  'dd.mm.yyyy' )  =   :search_date
    regards
    Siya

    1006237 wrote:
    If adate is of DATE datatype, it will most likely has the time component. Therefore your SQL below is unlikely to return any data.
    select * from aTable where adate = to_date(:search_date, 'dd.mm.yyyy')
    Perhaps.....
    select * from aTable where TRUNC(adate) = to_date(:search_date, 'dd.mm.yyyy')
    Hi,
    not having any sample data from you I could not understand that you wanted to select the range 00:00:00 - 23:59:59 on search_date.
    Your method might not be efficient if you have an index on adate.
    Maybe something like this will be more efficient
    select * from aTable
    where adate >= to_date(:search_date, 'dd.mm.yyyy')
      and adate <  to_date(:search_date, 'dd.mm.yyyy') + 1;
    If you search_date is 30-Aug-2013 it will get records where adate >= 30-Aug-2013 00:00:00 and adate < 31-Aug-2013 00:00:00, so any time of date 30-Aug-2013.
    Try like this and let us know if you still have 2 different results.
    Regards.
    Alberto

  • Query plan and negative value in where

    I have a question about this query:
    select g.col1,
    g.col2
    from tab1 g,
    tab2 part
    where part.col3 <> 0
    and g.col4 = 'PRO3'
    and g.col2 = part.col5
    and g.cod7 = -1
    This is the execution plan:
    SELECT STATEMENT, GOAL = ALL_ROWS               
    HASH JOIN               
    INDEX FAST FULL SCAN     SYS_C00254422     14     22453     516419
    TABLE ACCESS FULL     TAB2     920     67458     1079328
    If I change the select in this way:
    select g.col1,
    g.col2
    from tab1 g,
    tab2 part
    where part.col3 <> 0
    and g.col4 = 'PRO3'
    and g.col2 = part.col5
    and -g.cod7 = 1
    I have a new query plan:
    SELECT STATEMENT, GOAL = ALL_ROWS               
    NESTED LOOPS               
    INDEX FAST FULL SCAN     SYS_C00254422     
    TABLE ACCESS BY INDEX ROWID          TAB2     
    INDEX UNIQUE SCAN          SYS_C00254336     
    Oralce use a nested loop and the index of the table TAB1 and doesn't do the hash join.
    Why?
    I use oracle 10g
    Message was edited by:
    user613483
    Message was edited by:
    user613483

    SQL> desc TAB1
    Name Null? Type
    COL1 NOT NULL VARCHAR2(5)
    COL4 NOT NULL VARCHAR2(5)
    COL2 NOT NULL VARCHAR2(15)
    COL7 NOT NULL NUMBER(3)
    DTCOL8 NOT NULL DATE
    DRcol9 DATE
    LEVcol10 NUMBER(3)
    COL11 VARCHAR2(30)
    COD12 VARCHAR2(15)
    LEV13 NUMBER(3)
    COD14 VARCHAR2(15)
    LEV15 NUMBER(3)
    COD16 VARCHAR2(15)
    LEVN17 NUMBER(3)
    COD18 VARCHAR2(15)
    LEV19 NUMBER(3)
    CODNOD20 VARCHAR2(15)
    LEVNO21 NUMBER(3)
    CODNOD22 VARCHAR2(15)
    LEVN23 NUMBER(3)
    COD24 VARCHAR2(15)
    LEV25 NUMBER(3)
    CODNOD26 VARCHAR2(15)
    L27 NUMBER(3)
    CODN28 VARCHAR2(15)
    LEV28 NUMBER(3)
    D30 DATE
    SQL> desc tab2
    Name Null? Type
    COL5 NOT NULL VARCHAR2(15)
    DESY1 VARCHAR2(60)
    DESPA VARCHAR2(60)
    CODS VARCHAR2(5)
    CODNI VARCHAR2(5)
    CODZO VARCHAR2(10)
    CODC VARCHAR2(5)
    CDFIS VARCHAR2(30)
    CO VARCHAR2(30)
    CODVATI VARCHAR2(30)
    COT1 VARCHAR2(15)
    COT2 VARCHAR2(15)
    DCAT3 VARCHAR2(15)
    CAT4 VARCHAR2(15)
    COD VARCHAR2(15)
    COU VARCHAR2(5)
    FLG NOT NULL NUMBER(1)
    COT VARCHAR2(20)
    FLGCUSTD NOT NULL NUMBER(1)
    CODMOE VARCHAR2(5)
    FLG NOT NULL NUMBER(1)
    FLGC NOT NULL NUMBER(1)
    CODMOP VARCHAR2(5)
    CODC VARCHAR2(15)
    COELIV VARCHAR2(15)
    CONC VARCHAR2(15)
    COGMT VARCHAR2(10)
    COR VARCHAR2(5)
    COOUP VARCHAR2(15)
    VALDIT NUMBER(14,2)
    DTREDIT DATE
    DTRE DATE
    DTD DATE
    DST DATE
    DK DATE
    COCK VARCHAR2(5)
    CMOD VARCHAR2(5)
    FNN NOT NULL NUMBER(1)
    PGDCL VARCHAR2(60)
    PDB VARCHAR2(60)
    CXTEL VARCHAR2(15)
    ILCK VARCHAR2(15)
    DTTART DATE
    PVERY NUMBER(9)
    FLTUAL NOT NULL NUMBER(1)
    DVER DATE
    RIFE_INTERNO VARCHAR2(15)
    DATADATE
    ESENZIONE DATE
    NMSENZIONE VARCHAR2(15)
    VSED NUMBER(14,2)
    EORD NOT NULL NUMBER(1)
    EM VARCHAR2(30)
    COTER VARCHAR2(15)
    COUST VARCHAR2(15)
    CORINT VARCHAR2(15)
    TURFACE NUMBER(6)
    ODSURFACE NUMBER(6)
    ALINDEXPOT NUMBER(6)
    SSE NUMBER(6)
    NUSEATTR NUMBER(6)
    NUETTI NUMBER(6)
    CORTY VARCHAR2(15)
    DESEC VARCHAR2(60)
    QTEARI NUMBER(6)
    TOFACE NUMBER(6)
    COD VARCHAR2(30)
    FLGCI NUMBER(1)
    FLGC NUMBER(1)
    COL3 NUMBER(1)
    FLGCOL33 NUMBER(1)
    Query plan of the original select:
    1     SQL_ID 51kgr2x36h3y4, child number 0
    2     -------------------------------------
    3     select g.col1, g.col2 from tab1 g, tab2 part
    4     where part.col3 <> 0 and g.col4 = 'PRO3' and g.col2 =
    5     part.col5 and g.col7 = -1
    6     
    7     Plan hash value: 2145701647
    8     
    9     ---------------------------------------------------------------------------------------
    10     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    11     ---------------------------------------------------------------------------------------
    12     | 0 | SELECT STATEMENT | | | | 938 (100)| |
    13     |* 1 | HASH JOIN | | 22485 | 856K| 938 (17)| 00:00:05 |
    14     |* 2 | INDEX FAST FULL SCAN| SYS_C00254422 | 22453 | 504K| 14 (8)| 00:00:01 |
    15     |* 3 | TABLE ACCESS FULL | TAB2 | 67458 | 1054K| 920 (16)| 00:00:05 |
    16     ---------------------------------------------------------------------------------------
    17     
    18     Predicate Information (identified by operation id):
    19     ---------------------------------------------------
    20     
    21     1 - access("G"."COL2"="PART"."COL5")
    22     2 - filter(("G"."COL7"=(-1) AND "G"."COL4"='PRO3'))
    23     3 - filter("PART"."COL3"<>0)
    24     
    Sql plan of the second quesry:
    1     SQL_ID g1hc2xj88sc7x, child number 0
    2     -------------------------------------
    3     select g.col1, g.col2 from tab1 g, tab2 part where
    4     part.col3 <> 0 and g.col4 = 'PRO3' and g.col2 = part.col5
    5     and -g.col7 = 1
    6     
    7     Plan hash value: 601419963
    8     
    9     ----------------------------------------------------------------------------------------------
    10     | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    11     ----------------------------------------------------------------------------------------------
    12     | 0 | SELECT STATEMENT | | | | 512 (100)| |
    13     | 1 | NESTED LOOPS | | 249 | 9711 | 512 (1)| 00:00:03 |
    14     |* 2 | INDEX FAST FULL SCAN | SYS_C00254422 | 248 | 5704 | 15 (14)| 00:00:01 |
    15     |* 3 | TABLE ACCESS BY INDEX ROWID| TAB2 | 1 | 16 | 2 (0)| 00:00:01 |
    16     |* 4 | INDEX UNIQUE SCAN | SYS_C00254336 | 1 | | 1 (0)| 00:00:01 |
    17     ----------------------------------------------------------------------------------------------
    18     
    19     Predicate Information (identified by operation id):
    20     ---------------------------------------------------
    21     
    22     2 - filter(((-"G"."COL7")=1 AND "G"."COL4"='PRO3'))
    23     3 - filter("PART"."COL3"<>0)
    24     4 - access("G"."COL2"="PART"."COL5")
    25     
    Index used:
    Primary key on tab2 SYS_C00254336:
    alter table TAB2
    add primary key (COL5)
    using index
    tablespace name_tablespace;
    Primary key on tab1 SYS_C00254422;
    alter table TAB1
    add primary key (COL1, COL4, COL2, COL7, DTCOL8 )
    using index
    tablespace name_tablespace;
    Message was edited by:
    user613483
    Message was edited by:
    user613483

  • MS Project 2010 Server - How to move a single MS Project plan and SharePoint Project site from a PWA server to another PWA server (one at a time)

    MS Project 2010 Server
    How to move a single MS Project plan and it's SharePoint project site from a PWA server to another PWA server (one at a time)
    I have 2 Project PWA servers, i know how to copy all the databases (Publishing, Draft, Reporting, archive, content) from one SQL server and copy it to the other PWA server so both server can be identical.
    I need to only move a single project from a PWA server to another, 
    Moving the Project plan, actual time data, SharePoint site with all it's content
    Is there a 3rd party tool that can be added on to the server to help me move single project plans? to different PWA servers?
    -Isaack

    Visit my friends at FluentPro and try FluentBooks
    http://www.fluentpro.com/productsfluentbooks2013.html
    they have a 2010 version also.
    Hope that helps,
    Thanks, Eric S. Pcubed

  • Different result from Excel

    Hi all,
    I hv done some thing with Excel for example
    =(42-40)/1.5 and result is 1.333333333
    When I am doing same with Oralce in "select statement", it is giving some different result, which is given below.
    select Round((42-40)/1.5,9) from dual
    the result is 1.003769326
    Can any one help in this regards
    thx

    My workout is as follows..
    [b]I am using Oracle 9i.
    SQL> select (42-40)/1.5 from dual;
    (42-40)/1.5
    1.33333333
    SQL> select round((42-40)/1.5) from dual;
    ROUND((42-40)/1.5)
    1
    SQL> select round((42-40)/1.5,9) from dual;
    ROUND((42-40)/1.5,9)
    1.33333333
    SQL>

  • Different result froma same MDX

    I'm using this MDX:
    WITH
    member [Measures].[RIGA] as [Commerciale].[Nominativo].CurrentMember.Name
    SELECT {
      [Measures].[RIGA] , [Measures].[Fatturato]
      }  ON 0,
     non empty( [Incasso].[Mod Pag].Members,  [Incasso].[Cond Pag].members, [Data].[Periodo].[Mese].&[2014]&[8], [Commerciale].[Nominativo].&[VALUEA] ) on rows
    FROM [MYADSB]
    if i run in query anylizer i have a result like this
    All
    All
    Agosto
    VALUEA
    VALUEA
    1,139
    All
    30
    Agosto
    VALUEA
    VALUEA
    1,139
    RIBA
    All
    Agosto
    VALUEA
    VALUEA
    1,139
    RIBA
    30
    Agosto
    VALUEA
    VALUEA
    1,139
    if i run same MDX as a dataset in SSRS i have this results:
    All
    All
    Agosto
    VALUEA
    VALUEA
    1,139
    RIBA
    30
    Agosto
    VALUEA
    VALUEA
    1,139
    RIBA
    All
    Agosto
    VALUEA
    VALUEA
    1,139
    RIBA
    30
    Agosto
    VALUEA
    VALUEA
    1,139
    The second row is changed from All 30 to RIBA 30, how it is possible?

    i checked with sql profiler and the query are the same.
    The dimension incasso is derived from this table
    id
    modPag
    CondPag
    BO30
    BONIFICO
    30
    BO60
    BONIFICO
    60
    BO90
    BONIFICO
    90
    RB30
    RIBA
    30
    RB40
    RIBA
    40
    RB45
    RIBA
    45
    RB60
    RIBA
    60
    RB90
    RIBA
    90
    using [Incasso].[Mod Pag].Members,  [Incasso].[Cond Pag].members I should see 4 row 
    ModPag
    CondPAg
    All
    All
    All
    30
    RIBA
    All
    RIBA
    30
    but I see
    MOdPag
    CondPAg
    All
    All
    RIBA
    30
    RIBA
    All
    RIBA
    30

  • Different results from 3.0 to 3i

    I am creating worksheets on Oracle Discoverer 3.1 User Edition (Version 3.1.36.06) and trying to view them on Oracle Discoverer 3i Viewer Edition v3.3.57.24.
    I get normal results on the user edition. I get various results on the 3i version. I noticed that just adding totals to a worksheet caused different results in 3i. In some cases, the worksheet would display rows in 3i but no totals. It would also run extremely longer in 3i (minutes versus seconds). In other cases, 3i Viewer would return the message that the worksheet was empty. I also received an error message "An error occurred while trying to run the query. (Internal EUL Error: ExprPArseNodeType - Invalid type in canonical formula".
    I have developed various reports in a different Business Area that are working as expected in 3i.
    Any help would be appreciated.

    Please tell us your first name and put it into your OTN profile and handle as a courtesy and help to us. Thanks.
    There is a patch for this problem on Metalink for bug 7138068, file p7138068_111060_GENERIC.zip.
    Scott

Maybe you are looking for

  • HT201302 Is there a way to transfer videos I took with my Pentax camera onto my iPad 1?

    It looks like they transferred with my photos as a unplayable file onto my iPad...but when I tried to transfer them from the iPad to my computer they didn't show up. It would be nice if I can do this, as on trips, I would like to clear space on my ca

  • Is MANDT(client) field required or not in the View

    Hi Im creating a view on top of 5-Base Tables. Im a SAP-BW Consultant. during creating the view , can i select the MANDT(client) from each table or not . Is this field is required in view or not . pls let me know kumar

  • How open a file and not showing window?

    I write a script to do some work automatic, for Indesign script, its application open method could open a file and not showing window, the open method has a parameter [ShowingWindow] (if true, show the document window). That is good a feature for me.

  • IPhone4s - Exchange 2003 sp2

    I've searched and searched for this problem and it seems to be common, but nothing suggested works.  I keep getting UNABLE TO VERIFY ACCOUNT INFORMATION.I have verified that OWA works from the outside and he was able to log in though OWA. So I know h

  • New purchases will not sync!

    I purchased music the other day from itunes and they will not sync onto ipod.  If I try to manually sync I get a message asking if I want to delete songs.  If I click this it looks like i will lose all of my cd downloaded music.  I do not want to do