Problem with Timestamp

Hi
I am using Oracle 10.1.0.4. When I am storing events with the received
timestamps, it stores in GMT. But I am calling the stored procedure
with timestamp in IST. Similarly when I search for that using IST, It
returns the results matching the corresponding GMT. If I search 6.30 AM
IST, It returns results for 1.00 AM.
Appreciate your help

What kind of timestamp datatype?
How are timestamps "received" and stored?
Time zone settings (sessions and database)?
SQL> drop table tider;
Table dropped.
SQL> create table tider (t1 timestamp with time zone, t2 timestamp with local time zone);
Table created.
SQL> select sessiontimezone from dual;
SESSIONTIMEZONE
-05:00
SQL> insert into tider values ('1-jul-6 1:0:0 pm','1-jul-6 1:0:0 pm');
1 row created.
SQL> select * from tider;
T1
T2
01-JUL-06 01.00.00.000000 PM -05:00
01-JUL-06 01.00.00.000000 PM
SQL> alter session set time_zone='Europe/Stockholm';
Session altered.
SQL> select * from tider where t1='1-jul-6 8:0:0 pm CET';
T1
T2
01-JUL-06 01.00.00.000000 PM -05:00
01-JUL-06 08.00.00.000000 PM
Is this same as what you are seeing?

Similar Messages

  • Problem with timestamp in query

    I have problem with timestamp in JPA query.
    I wonna select all data from database where difference between two timestamps is more than 3 month.
    Database:
    ID timestamp1 timestamp2
    1 20008-11-19 15:02000 20008-08-19 15:02000
    2 20008-11-19 15:02000 20008-11-14 15:02000
    @Column(name = "timestamp1", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp1;
    @Column(name = "timestamp2", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date timestamp2;
    sql query works:
    select id from table where
    MONTH( DATE(timestamp1) - DATE(timestamp2) ) > 3
    but how I can write in Java?
    I't doesnt wrk:
    Query query = em.createQuery("SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3 ")
    error:
    ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method .
    Exception data: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: An error occurred while parsing the query filter 'SELECT f.id FROM Foo f WHERE MONTH( DATE(f.timestamp1) - DATE(f.timestamp2) ) > 3'.
    Error message: <openjpa-1.0.2-r420667:627158 nonfatal user error> org.apache.openjpa.kernel.jpql.ParseException: Encountered "MONTH (" at character 438, but expected: ["(", "+", "-", ".", ":", "", "=", "?", "ABS", "ALL", "AND", "ANY", "AS", "ASC", "AVG", "BETWEEN", "BOTH", "BY", "CONCAT", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "DELETE", "DESC", "DISTINCT", "EMPTY", "ESCAPE", "EXISTS", "FETCH", "FROM", "GROUP", "HAVING", "IN", "INNER", "IS", "JOIN", "LEADING", "LEFT", "LENGTH", "LIKE", "LOCATE", "LOWER", "MAX", "MEMBER", "MIN", "MOD", "NEW", "NOT", "NULL", "OBJECT", "OF", "OR", "ORDER", "OUTER", "SELECT", "SET", "SIZE", "SOME", "SQRT", "SUBSTRING", "SUM", "TRAILING", "TRIM", "UPDATE", "UPPER", "WHERE", <BOOLEAN_LITERAL>, <DECIMAL_LITERAL>, <IDENTIFIER>, <INTEGER_LITERAL>, <STRING_LITERAL>].
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.parse(JPQLExpressionBuilder.java:1665)
    at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.<init>(JPQLExpressionBuilder.java:1645)

    The error is indocating improper formatting of your JPQL string. MONTH is not understood. I would recommend using your SQL string in a createNativeQuery(...) call instead.
    Doug

  • Problems with timestamps

    Hello everybody,
    and here is my problem for this day ;-).
    I am trying to use a timestamp which comes from an database entry.
    The data type in the database is timestamp and the entries are looking
    like this 2002-06-19 09:22:19.238805. My question is now
    how to use this timestamp in Java. I have tried to use new Timestamp(..) so far, but either I use the deprecated constructor or a constructor with the timestamp in milliseconds after 1970. But I don't have the milliseccons and using the first mentioned constructor isn't that productiv.
    It would be perfect if I could use the generated date for a date navigator as well.
    Has anyone a solution?
    Best regards
    Joachim

    Hi,
    In database it will always display you as a String you told,  but when you fetch it the return type will always be java.sql.TimeStamp or java.sql.Date.
    so You can use the my method of using it.
    Otherwise you have to read the strings and create the date... which a wrong way of doing it ,because all methods are deprecated.
    REgards,
    Praveen

  • File Synch problem with timestamp

    Win2k, LabVIEW 7.0
    I'm trying to do file synchronization between the data files I produced on the local disk, and a remote server.
    I am doing a LIST FILES on the local folder, and a LIST FILES on the remote folder.
    For each file, I do a GET FILE INFO, and look at the LAST MOD data (a TIMESTAMP value).
    For each file in the SOURCE folder, I match it up with the corresponding entry in the DESTINATION folder.
    I then compare the times, and if the SOURCE timestamp is greater than the DEST timestamp, then I delete the DEST file, and COPY the source file to the DEST.
    There are a few files that fail this process, though, and I am puzzled as to why.
    If I look (via Windows explorer) at the properties of one of these files, it says the LAST MOD date is 6:09:20. That is the case for BOTH the local copy and the remote copy.
    However, the SYNCH logic above insists on copying this file every time it runs. When I add logging stuff to the synch process, it tells me that the local file has a date of 6:09:21, and the remote file has a date of 6:09:20, so it wants to copy it.
    But after the copy, things are exactly the same - Windows shows the times identical, but LabVIEW shows them ONE second apart, and copies them AGAIN the next time it runs. This is true for about 6 files out of a folder of 50-60. I suppose I could allow for that one second, if I knew why it was there.
    What's biting me here? If the file really had a MOD DATE resolution of 1 mSec say, then I could understand that maybe the PROPERTIES window truncates the value, and the TIMESTAMP does not. But even then, it ought to copy ONCE and set them the same...
    The "Server" I am testing on is running OSX, 10.4.6, if that matters.
    What am I missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    CoastalMaineBird wrote:
    Win2k, LabVIEW 7.0
    I'm trying to do file synchronization between the data files I produced
    on the local disk, and a remote server.
    I am doing a LIST FILES on the local folder, and a LIST FILES on the
    remote folder.
    For each file, I do a GET FILE INFO, and look at the LAST MOD data (a
    TIMESTAMP value).
    For each file in the SOURCE folder, I match it up with the
    corresponding entry in the DESTINATION folder.
    I then compare the times, and if the SOURCE timestamp is greater than
    the DEST timestamp, then I delete the DEST file, and COPY the source
    file to the DEST.
    There are a few files that fail this process, though, and I am puzzled as to why.
    If I look (via Windows explorer) at the properties of one of these
    files, it says the LAST MOD date is 6:09:20. That is the case for BOTH
    the local copy and the remote copy.
    However, the SYNCH logic above insists on copying this file every time
    it runs. When I add logging stuff to the synch process, it tells me
    that the local file has a date of 6:09:21, and the remote file has a
    date of 6:09:20, so it wants to copy it.
    But after the copy, things are exactly the same - Windows shows the
    times identical, but LabVIEW shows them ONE second apart, and copies
    them AGAIN the next time it runs. This is true for about 6 files out of
    a folder of 50-60. I suppose I could allow for that one second, if I
    knew why it was there.
    What's biting me here? If the file really had a MOD DATE resolution of
    1 mSec say, then I could understand that maybe the PROPERTIES window
    truncates the value, and the TIMESTAMP does not. But even then, it
    ought to copy ONCE and set them the same...
    The "Server" I am testing on is running OSX, 10.4.6, if that matters.
    What am I missing?
    It
    is a file system issue. NTFS uses something like a 100nSec resolution
    but historically the FAT file times have had a two second resolution.
    Apparently the Property dialog does convert the timestamp to a DOS time
    all the time before displaying it.
    Your MacOSX system uses a completely different resolution (at least 1
    sec but probably better). The network protocol does allow for high
    resolution transmissions and so the exact time gets transmitted but
    somehow your local system has a DOS limitation for the harddisk volume
    in question so that LAbVIEW returns the DOS time too for the local
    volume. The Explorer property dialog will always show DOS time only it
    seems, I had similar issues in the past but didn't really dig deeper,
    just accepted the 1 second difference.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • File Synchronization problem with TimeStamp

    Win2k, LabVIEW 7.0
    I'm trying to do file synchronization between the data files I produced on the local disk, and a remote server.
    I am doing a LIST FILES on the local folder, and a LIST FILES on the remote folder.
    For each file, I do a GET FILE INFO, and look at the LAST MOD data (a TIMESTAMP value).
    For each file in the SOURCE folder, I match it up with the corresponding entry in the DESTINATION folder.
    I then compare the times, and if the SOURCE timestamp is greater than the DEST timestamp, then I delete the DEST file, and COPY the source file to the DEST.
    There are a few files that fail this process, though, and I am puzzled as to why.
    If I look (via Windows explorer) at the properties of one of these files, it says the LAST MOD date is 6:09:20. That is the case for BOTH the local copy and the remote copy.
    However, the SYNCH logic above insists on copying this file every time it runs. When I add logging stuff to the synch process, it tells me that the local file has a date of 6:09:21, and the remote file has a date of 6:09:20, so it wants to copy it.
    But after the copy, things are exactly the same - Windows shows the times identical, but LabVIEW shows them ONE second apart, and copies them AGAIN the next time it runs. This is true for about 6 files out of a folder of 50-60. I suppose I could allow for that one second, if I knew why it was there.
    What's biting me here? If the file really had a MOD DATE resolution of 1 mSec say, then I could understand that maybe the PROPERTIES window truncates the value, and the TIMESTAMP does not. But even then, it ought to copy ONCE and set them the same...
    The "Server" I am testing on is running OSX, 10.4.6, if that matters.
    What am I missing?
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    So every time you store a file with an uneven number of seconds it will loose the last bit and become even
    That's not the case. If you read the real thread (I'm not sure how this got posted here, though I know I'm responsible), you'll see that I found cases where it rounded(?) the time from an even number to an odd number of seconds.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • Database toolkit & Oracle 11g, problem with timestamps

    I tested my application, based on the Database toolkit, with Access and Oracle XE (10g) databases and all was ok. After moving my database to a Oracle 11g server, i get this error for any query involving a TIMESTAMP WITH TIME ZONE or TIMESTAMP WITH LOCAL TIME ZONE column:
    ADO Error: 0x80040E21
    Exception occured in Microsoft OLE DB Provider for ODBC Drivers: ODBC driver does not support the requested properties.
    The error is raised by the "Execute" invoke node in "DB Tools execute query.vi".
    Using Labview 2009 and up to date Oracle ODBC drivers on Windows XP

    Hi SnamProgetti,
    I don't have any useful information about this error. You can try to read this and this document.
    Have a nice day,
    Simone S.
    Academic Field Engineer - Med Region

  • Strange problem with timestamps

    Hi
    I don't think this is a bc4j problem, but maybe someone can give me a hint anyway...
    What would you expect the following code to print:oracle.jbo.domain.Timestamp ts = new oracle.jbo.domain.Timestamp("0000-02-03 11:12:59");
    System.out.println(ts);I guess you would expect something like "0000-02-03 11:12:59", would you? But this code prints "0001-02-03 11:12:59". Note that the year has silently been changed from 0000 to 0001. It is getting even more strange if you look at the following codeoracle.jbo.domain.Timestamp ts = new oracle.jbo.domain.Timestamp("0001-02-03 11:12:59");
    System.out.println(ts);This code prints just the same as the first example: "0001-02-03 11:12:59".
    To say the truth I'd have expected everything, but not that years are silently converted to other years without any notification or exceptions.
    Has anyone a clue what is happening here?
    Thanks
    Frank Brandstetter

    In my opinion it's simply logic:
    The first day, the first month , the first year is 0001-01-01.
    The zero year doens't exists.
    Regards
    Fred

  • Problems with Timestamp

    Hello everyone!!
    I have a table for work with schedules, that has timestamp's fields. When I enter a time, for example, 09:00, the database save it as 01/01/70 09:00:00.
    I want to use the actual date instead 01/01/70. What can I do?
    Thanks.

    I believe your using java,
    You may get the system date,
    Then use the calender's following method
    void set(int year, int month, int date, int hour, int minute, int second) /*Sets the values for the fields year, month, date, hour, minute, and second. */
    And then :
    long getTimeInMillis()
    Gets this Calendar's current time as a long.
    To create the Timestamp.
    Hope it helps,
    Daniel Campelo

  • Problems with TIMESTAMP Field from SQL Server

    OBIEE 11g
    Hi All,
    I want to convert data into OBIEE that is coming from a TIMESTAMP field in SQL Server Database. So in SQL Server field has data like '9/20/2012 12:05:08 AM'. I have first changed the datatype in physical layer to DATETIME and then in BMM I do a CAST(<DATE_FIELD> AS DATE). On the frontend when I use this column the error I get back is [nQSError: 59030] Illegal data type conversion from source type: VARBINARY to target type: TIMESTAMP. (HY000). Does anyone know a workaround or solution.
    Thanks in Advance!

    Hi Guys,
    None of the solutions you mentioned have worked unfortunately. I have a date column and another column that holds user id. I basically want to do a count of all the user id's where that particular date column is NULL. I have checked in the physical layer and the date column in question is coming from SQL Server as a TIMESTAMP datatype. So I initially did not change anything and brought the column in as is but that did not work out. I then tried to change the datatype in the physical layer to DATETIME and then also DATE. After changing the datatype in the physical layer in the BMM I would do a CAST(<date column> as DATE) and this still did not work. I then tried to just change the datatype to DATETIME and DATE without doing the CAST in the BMM and this still did not work. Not too sure what to do now.

  • Problem with SDO_FILTER combined with Timestamp and Order By using JDBC

    I'm having a problem with using SDO_FILTER. I've included a test driver below. It seems that I'm having a problem with combining the SDO_FILTER, Timestamp, ORDER BY and a nested table using the Oracle 11.1.0.7.0 driver against Oracle 11g. The below query queryNoWork results in the following error:
    Caused by: java.sql.SQLException: ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "MDSYS.SDO_3GL", line 1320
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1034)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:194)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:791)
    at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:866)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3387)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3488)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:299)
    All of the other query variations seem to work. The GEOM column referenced is a Linestring that has only 2 points, start and end. Any help on this would be greatly appreciated. Thanks!
    import java.math.BigDecimal;
    import java.sql.Connection;
    import java.sql.Date;
    import java.sql.Driver;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Timestamp;
    import java.text.SimpleDateFormat;
    import java.util.ArrayList;
    import java.util.Enumeration;
    public class QueryTester
         public static void main(String[] args)
              try
                   SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
                   ArrayList<Object> queryParameters = new ArrayList<Object>();
                   queryParameters.add(new BigDecimal(0));
                   queryParameters.add(new Double(0));
                   queryParameters.add(new BigDecimal(180));
                   queryParameters.add(new Double(90));
                   queryParameters.add(new java.sql.Date(sdf.parse("2005-12-25").getTime()));
                   queryParameters.add(new java.sql.Date(sdf.parse("2005-12-26").getTime()));               
                   BigDecimal one = new BigDecimal(1);
                   DriverManager.registerDriver((Driver) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance());
                   Enumeration<Driver> drivers = DriverManager.getDrivers();
                   while(drivers.hasMoreElements())
                        System.out.println(drivers.nextElement().getClass().getName());
                   Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@xxxx:1521:xxxx", "xxxx", "xxxx");
                   String queryNoWork = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID ) a) where rowcount between 1 and 30000";
                   String queryWorks0 = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_relate(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID ) a) where rowcount between 1 and 30000";
                   String queryWorks1 = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= TO_TIMESTAMP('2005-12-25','YYYY-MM-DD') and START_DATE < TO_TIMESTAMP('2005-12-26','YYYY-MM-DD')) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID ) a) where rowcount between 1 and 30000";
                   String queryWorks2 = "select * from (select ROWNUM rowcount, a.* from (select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ) a) where rowcount between 1 and 30000";
                   String queryWorks3 = "select * from TRACK_SEGMENTS where ( ( sdo_filter(GEOM, sdo_geometry(2003, 8307, null, sdo_elem_info_array(1, 1003, 3), sdo_ordinate_array(?, ?, ?, ?) ), 'MASK=ANYINTERACT') = 'TRUE' and END_DATE >= ?and START_DATE < ?) and 1 = 1 and 1 = 1) and ((START_DATATYPE = 'maritime_dense')) ORDER BY ID";
                   String query = queryWorks0;
                   PreparedStatement s = conn.prepareStatement(query);
                   int parameterIndex = 0;
                   for (Object object : queryParameters) {
                        if (object instanceof Timestamp)
                             s.setDate(++parameterIndex, (Date) object);
                        else
                             s.setObject(++parameterIndex, object);
                   s.execute();
                   ResultSet results = s.getResultSet();
                   results.next();
                   System.out.println("executed query - " + results.getLong(1));
              catch (Exception e)
                   e.printStackTrace();
    }

    Is the TRACK_SEGMENTS table partitioned ?
    It looks like in the case where the SQL does not work, it is not using the Spatial index. So can you add some index hints
    in the query to force it to use the spatial index TRACK_SEGMENTS table ?
    siva

  • Timestamp problem with Toplink9.0.3 and OC4J 9.0.3,9.0.4

    Hello,
    we use Toplink 9.0.3 as OR tool in our application deployed in OC4J 9.0.3 or 9.0.4. In both containers we have a problem with java.sql.Timestamp attributes of objects - when an object is fetched from DB (Oracle 9i) the time portion is always cleared. So we see only the date portion of timestamp. Timestamps are correct in database.
    We tried one workaround in 9.0.3: we replaced oc4j\jdbc\lib\classes12dms.jar with ojdbc14.jar taken from Oracle9i DB. This worked for us but we had deadlock problems (I've already posted it here some days ago) - I actually don't know if the problems were caused by this workaround or not...
    Thanks for replies.
    Marcel

    Marcel,
    Like I said, OC4J supports JDK 1.3 only (by default). Therefore, the "classes12dms.jar" driver is also only compatible with JDK 1.3. As far as I know, there is no problem associated with replacing "classes12dms.jar" with "ojdbc14.jar", but I think you also need to configure OC4J to work with JDK 1.4 -- and it's not clear to me from your postings, whether you have done that (or not).
    There was a recent post in these forums that referred to the product compatibility matrix that is available from Oracle's MetaLink Web site. Have you checked your Oracle product combination against it?
    Good Luck,
    Avi.

  • Problem with subqueries returning TIMESTAMP's

    I've got problems with some subqueries returning TIMESTAMP values.
    I've build a case for easy reproduction, with this query:
    SELECT iil.iil_lot_num ,
         (SELECT max ( lot_data_validade )
         FROM lot
         WHERE lot.lot_mat_cod = iil.iil_mat_cod AND
               lot.lot_num = iil.iil_lot_num ) as validade
    FROM iil
    WHERE ( iil.iil_inv_serie = 109 ) and
          ( iil. iil_inv_num = 16 ) and
          ( iil.iil_mat_cod = 111 )
    When I run it, it gives the error:
    General error;-9999 POS(1) System error: invalid_indexorder
    knldiag also gives:
    2009-07-28 15:03:18  9943 ERR 51080 SYSERROR -9999 invalid_indexorder
    I'm running on 7.6.06.03.
    Previous versions were giving another message:
    SQLCODE:  -9999      System error: Otherwise unknown errorcode
    If I change max ( lot_data_validade ) to  max ( year (lot_data_validade) ), it works. The problem is specifically with fetching that timestamp value from the subquery.
    Backup for reproduction of the problem is on:
    http://www.tecnova.com.br/maxdb/backup_problem
    (i've isolated only the tables involved in the problem, so the backup is tiny -> 4.3MB)

    HI Elke,
    I had the same idea at first but was largely disappointed to find that this 'corrupt index' is indeed a temp. resultset:
    --> max() query
    OWNER         TABLENAME           COLUMN_OR_INDEX     STRATEGY                                  PAGECOUNT
    DBA           IIL                                     RANGE CONDITION FOR KEY                           61
                                      IIL_INV_SERIE            (USED KEY COLUMN)                             
                                      IIL_INV_NUM              (USED KEY COLUMN)                             
                                      IIL_MAT_COD              (USED KEY COLUMN)                             
    INTERNAL      TEMPORARY RESULT                        EQUAL CONDITION FOR KEY                            1
                                      IIL_INV_SERIE            (USED KEY COLUMN)                             
    DBA           LOT                                     NO STRATEGY NOW (ONLY AT EXECUTION TIME)           
    INTERNAL      TEMPORARY RESULT                        TABLE SCAN                                         1
                                                               RESULT IS COPIED   , COSTVALUE IS       > 2 E10
    The cost expectation is really awesome here...
    --> max(year()) query
    OWNER     TABLENAME         COLUMN_OR_INDEX  STRATEGY                                  PAGECOUNT
    DBA       IIL                                RANGE CONDITION FOR KEY                           61
                                IIL_INV_SERIE         (USED KEY COLUMN)                   
                                IIL_INV_NUM           (USED KEY COLUMN)                   
                                IIL_MAT_COD           (USED KEY COLUMN)                   
    INTERNAL  TEMPORARY RESULT                   EQUAL CONDITION FOR KEY                            1
                                IIL_INV_SERIE         (USED KEY COLUMN)                   
    DBA       LOT                                NO STRATEGY NOW (ONLY AT EXECUTION TIME) 
                                                      RESULT IS COPIED   , COSTVALUE IS   
    This time the optimizer ran out of words for the expected effort for this query execution...
    The problem really seems to be the subquery-select as we can strip down the example to
    select (select max(lot_data_validade) maxval
    from lot
    where lot.lot_mat_cod=111) as maxval
    from dual
    and still see the error...
    regards,
    Lars

  • Viewing Excel Files using Tomcat - Problem with caching

    Hi all,
    A small part of an application I'm writing has links to Excel files for users to view/download. I'm currently using Tomcat v5 as the web/app server and have some very simple code (an example is shown below) which calls the excel file.
    <%@ page contentType = "application/vnd.ms-excel" %>
    <%
    response.setHeader("Pragma", "no-cache");
    response.setHeader("Cache-Control", "no-cache");
    response.setDateHeader("Expires", 0);
    response.sendRedirect("file1.xls");
    %>
    This all works except but I'm having one big problem.
    The xls file (file1.xls) is updated via a share on the server so each month, the xls file is overwritten with the same name but with different contents. I'm finding that when an update is made to the xls file and the user then attempts to view the new file in the browser they recieve only the old xls file. It's caching the xls file and I don't want it to. How can I fix this so that it automatically gives the user the new updated file.
    The only way I've managed to get Tomcat to do this is to delete the work directory and delete the file from my IE temp folder and then restart Tomcat - this is a bit much!
    Any help would be greatly appreciated.
    Thanks.

    I'd a problem with caching a few years back, for a servlet request which returned an SVG file.
    As a workaround, I ended up putting appending "#" and a timestamp / random number after it. The browser assuming each request was new, and didn't use the cache.
    Eg.
    http://myserver/returnSVG.do#1234567
    where 1234567 is a timestamp / random.
    Not sure whether you can do this on a file based URL... but maybe worth a shot...
    regards,
    Owen

  • Problem with Photos in Camera Roll after 4.0.1

    Hello,
    I have a 16GB iPhone 3G.
    I updated to iOS4.0 the day it came out, and other than the slowness that everyone else was reporting, I didn't have any other issues.
    When I updated to 4.0.1, everything seems a touch better performance wise, but I found a problem with my camera roll.
    First, when I opened the Photos App, there was no thumbnail for Camera Roll (all others were ok).
    I opened the camera roll, and the last 50 or so pics that I had taken, were all showing as one big Black blob (not individual black thumbnails, they were all joined)
    If I scrolled up to older pictures, the older ones were fine.
    I took a new picture to test it, and that one looks fine.
    So now I can see all my OLD pictures, and any NEW pictures I take, but those same 50 pictures were still showing as one big BLACK blob.
    I can still access the pictures if I touch them, and I can flip through them without any problems. I can also copy these photos from my phone to my PC, so the pictures themselves seem to be fine.
    And after copying them to my PC, what I noticed by examining the timestamps, was that the problematic pictures were all taken after I updated to iOS 4.0. It seems that all pictures from 3.1.3 or earlier are showing fine, and now all pictures taken with 4.0.1 are showing fine as well. So only pictures taken with 4.0 seem to be affected.
    Is there anything I can do to fix this?
    (Just for the record, my phone is not and has never been jailbroken.)

    There is a solution!!
    After installing iOS4.0.1 update on my 3G, I too had the black
    blob in my camera roll. As posted in an earlier thread, here's
    one way to resolve this problem. It worked for me!
    Just email the photos that don't appear in the camera roll to myself,
    delete the offending photos and then re-save them from the email.
    A bit of a pain but it's a way around it. Good luck!
    ErikV

  • Problem with sync in iphone 3gs

    im having a problem with my phone. when i try to sync it it shows
    Problem Event Name: BEX
    Application Name: iTunes.exe
    Application Version: 9.0.3.15
    Application Timestamp: 4b590a69
    Fault Module Name: StackHash_0a9e
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception Offset: 00000000
    Exception Code: c0000005
    Exception Data: 00000008
    OS Version: 6.1.7600.2.0.0.256.1
    Locale ID: 1033
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    was workin well but suddely i cant sync anymore.
    anyone can help please.

    I just ran into the same issue on my 2011 Explorer. Out of nowhere, I was unable to hear any audio when making or answering calls over Sync (iPhone 4s). Handsfree calls were no longer an option... not acceptable.
    After 1000 searches all over the web, I finally found a contact number for Sync support. Ford seems to be burying this phone number for some reason?!?
    Hopefully the rep you catch will be as helpful as the one I just spoke with! After a few steps (soft resetting the phone and resetting the car to manufacturer settings) I am able to make/receive calls again
    Ford Sync Support (800) 392-3673
    Good Luck!!

Maybe you are looking for

  • How to perform a classic Mac OS search in Tiger

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as

  • Firefox will not work without WiFi on Metropcs 4g lte network

    I can use Firefox on WiFi but if I am using the 4G network I just get a message that I must sign up for the MetroPCS Hotspot plan. That makes no sense. I'm not trying to tether with my phone. I can use the built in browser and Chrome but, Firefox is

  • Where can I get a valid channel and features linup?

    The FiOS man called today to say that it is now available at my residence.  I want to compare prices and features but when I use the channel linup link it keeps telling me that it is not available at my zip code.  Actually any zip I enter, even ones

  • Software Update- Now impossible to restore?

    I just updated the software on my iPone 4 and then it told me I needed to restore my phone so I clicked "Restore" then my options were "Update & Restore" or "Cancel". I tried the "Update & Restore" it it began to download the software again then tell

  • Key Figure getting summed up in the report

    Hello BW Gurus, Please help me out on this as soon as possible as I need to resolve this issue by the end of today. I have a Custom Key Figure 'X' in one of my ODS and I am hardcoding it with a constant value, say 1000. When I load the data and check