Is this a bug in oracle 9i

How come I do not get an error msg when i do this in oracle 9i
select last_day(to_date('2010-01'|| '01', 'YYYY-MM-DD')) from dualtechincally, this should be the right way to do it
select last_day(to_date('2010-01'|| '-01', 'YYYY-MM-DD')) from dual

Hi,
SomeoneElse wrote:
... It may seem kind of funny but the keyword OUTER is entirely optional when doing an OUTER join.
(INNER is also optional)That is paradoxiocal: the keyword OUTER in optional for outer joins, INNER is optional for inner joins.
INNER being optional makes a certain amolunt of sense. Most joins are inner joins, so there's some logic to making it the default.
Outer joins are the only kind of joins that are asymmetrical. For the other kinds (inner joins, cross joins and full outer joins) it doesn't matter which table is on the left or the right, the results are always the same. So if you say LEFT or RIGHT (or FULL, for that matter), then you must mean OUTER, and you can omit the keyword OUTER.

Similar Messages

  • Is this a bug in Oracle 10g ?

    I've been trying to port my SQL from 9.2.0.6 to 10g recently and noticed a problem using the sequence operator NEXTVAL from within a trigger, when inserting rows into another tables.
    For example, the following code works ok on 9.2.0.6 but when run on 10g the KPIIDD.NEXTVAL is inserted as NULL.
    << This is part of a Trigger on PDRTEM table >>
    INSERT INTO LSTKPI (KPIIDD, PRMNME, KPISUP, TEMIDD1)
    VALUES (KPIIDD.NEXTVAL, NEXTPRM.PRMNME, NEXTSTA.STANAM, PDRTEM_PKG_1.rids(i));
    In order to fix the problem i had to add a +0 to the NEXTVAL clause, as demonstrated in the following example which works in 9.2.0.6 and 10g
    INSERT INTO LSTKPI (KPIIDD, PRMNME, KPISUP, TEMIDD1)
    VALUES (KPIIDD.NEXTVAL+0, NEXTPRM.PRMNME, NEXTSTA.STANAM, PDRTEM_PKG_1.rids(i));
    NOTE: If the insert is outside of a Trigger then it's fine - just when within the Trigger it's a problem.

    Do your sequence and column have the same name? In your code sample, it looks like they do:
    INSERT INTO LSTKPI (KPIIDD, PRMNME, KPISUP, TEMIDD1)
    VALUES (KPIIDD.NEXTVAL, NEXTPRM.PRMNME, NEXTSTA.STANAM, PDRTEM_PKG_1.rids(i));
    Maybe that has confused the parser.
    As Oracle moves forward, you can expect more object-oriented functionality. That could mean that columns could have their own attributes or methods. If so, how is the parser to know whether in this code the value KPIIDD.NEXTVAL refers to the (external) sequence or a column attribute?
    As a suggestion, try renaming the sequence.
    create sequence KPIIDD_SEQ start with ... ;
    INSERT INTO LSTKPI (KPIIDD, PRMNME, KPISUP, TEMIDD1)
    VALUES (KPIIDD_SEQ.NEXTVAL, NEXTPRM.PRMNME, NEXTSTA.STANAM, PDRTEM_PKG_1.rids(i));
    HTH,
    - Doug

  • Help! Is this a bug of Oracle 9i's Net8?

    I installed Oracle 9i client over that of 8i on Windows 2000,
    and every thing seems perfect on installation. But when comes
    the Net Configuration Assistant, I surprisingly found I can't
    connect the servers I could once connect. The error is:
    ORA-03113 end-of-file on communication channel
    How could this happen? Please help me!

    Hi,
    SomeoneElse wrote:
    ... It may seem kind of funny but the keyword OUTER is entirely optional when doing an OUTER join.
    (INNER is also optional)That is paradoxiocal: the keyword OUTER in optional for outer joins, INNER is optional for inner joins.
    INNER being optional makes a certain amolunt of sense. Most joins are inner joins, so there's some logic to making it the default.
    Outer joins are the only kind of joins that are asymmetrical. For the other kinds (inner joins, cross joins and full outer joins) it doesn't matter which table is on the left or the right, the results are always the same. So if you say LEFT or RIGHT (or FULL, for that matter), then you must mean OUTER, and you can omit the keyword OUTER.

  • Bug in oracle portal: problem in pl/sql item type

    I created a pl/sql item type... based on a stored proc... whenever I make a change to the store proc I have to readd the item based on this item type since the result on the item type is not updated is this some bug in oracle portal

    I created a pl/sql item type... based on a stored proc... whenever I make a change to the store proc I have to readd the item based on this item type since the result on the item type is not updated is this some bug in oracle portal

  • Bug in Oracle UpdatableResultSet? (insert, updateString requires non-empty ResultSet?

    As far as I can determine from the documentation and posts in other newsgroups
    the following example should work to produce an updatable but "empty" ResultSet which can be used to insert rows.
    But it doesn't work in a JDK 1.2.2 and JDK 1.3.0_01 application using Oracle 8i (8.1.7) thin JDBC
    driver against an Oracle 8.1.5 database I get the following error
    SQLException: java.sql.SQLException: Invalid argument(s) in call: setRowBufferAt
    However, if I change it to so the target (ie insert) ResultSet is initialized to contain one or more
    rows, it works just fine.
    ResultSet rset2 = stmt2.executeQuery ( "select Context.* from Context where ContextCd = '0' " );
    Is this a bug in Oracle's JDBC driver (more specifically, the UpdatableResultSet implimentation)?
    Does an updatabable ResultSet have to return rows to be valid and useable for insert operations?
    If it does, is there another way to create an updatable ResultSet that does not depend upon
    "hard-coding" some known data value into the query?
    try
    // conn is a working, tested connection to an Oracle database via 8.1.7 thin JDBC driver.
    // source statement
    Statement stmt = conn.createStatement (
    ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY );
    System.out.println("source rset");
    rset = stmt.executeQuery ( "select Context.* from Context" );
    // target Statement
    Statement stmt2 = conn.createStatement (
    ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE );
    ResultSet rset2 =
    stmt2.executeQuery ( "select Context.* from Context where ContextCd = NULL" );
    System.out.println(
    "see if rset2 looks good even though empty (bcs primarykey = null)");
    ResultSetMetaData rsmd2 = rset2.getMetaData();
    int numColumns = rsmd2.getColumnCount();
    for( int i = 0; i <= numColumns; i++ )
    env.msg.println ( "(" + i + ") " + rsmd2.getColumnLabel(i) );
    // test results showed the correct columns even though no row returned.
    // quess we can use this trick to create an "empty" insert ResultSet.
    System.out.println("interate through rset and insert using rset2");
    if(rset.next())
    System.out.println("move to insert row");
    rset2.moveToInsertRow();
    System.out.println("insert values");
    rset2.updateString( "ContextCd", rset.getString("ContextCd") + "-test" );
    rset2.updateString( "Descrip", "test" );
    rset2.updateString( "Notes", "test" );
    System.out.println("insert row into db (but not committed)");
    rset2.insertRow();
    catch( ... ) ...
    Thanks
    R.Parr
    Temporal Arts

    I have noticed the same problem, actually it doens't matter if there is no data in your resultset. If you have a result with data and suppose you were to analyze the data by moving through all of the rows, the cursor is now after the last row. If you call insertRow, the same exception is thrown. Kinda strange, I didn't get any response as to why this is happening and that was a few weeks ago. I hope someone responds, at this point I am just re-writing some of my code to not use updateable resultsets.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Randall Parr ([email protected]):
    As far as I can determine from the documentation and posts in other newsgroups
    the following example should work to produce an updatable but "empty" ResultSet which can be used to insert rows.
    But it doesn't work in a JDK 1.2.2 and JDK 1.3.0_01 application using Oracle 8i (8.1.7) thin JDBC
    driver against an Oracle 8.1.5 database I get the following error<HR></BLOCKQUOTE>
    null

  • Is this a bug in table operator

    I have an Oracle function that is invoked by the select statement as follow:
    select count(*)
    into i
    from table(
    select depts -- depts is a varray of dept_obj
    from table(company_package.f_getCompany(k))
    the function f_getCompany(k) gets invoked twice.
    but if I change the SQL to
    select depts
    into dept_array
    from table(company_package.f_getCompany(k));
    then function f_getCompany(k) will be invoked just once.
    Is this a bug within Oracle ? How can I get around that, I just want the function execute ONCE.
    Any help would be appricated.
    Thanks
    Here are the rest of the code
    create or replace type company_obj as object
    company_id number,
    company_name varchar2(20),
    depts dept_arr
    CREATE OR REPLACE
    type company_arr is VARRAY(10000) of company_obj;
    create or replace type dept_obj as object
    dept_id number,
    dept_name varchar2(30)
    CREATE OR REPLACE
    type dept_arr is VARRAY(10000) of dept_obj;
    create or replace package company_package is
    number_of_times int := 0;
    function f_getCompany(company_id number) return company_arr;
    end company_package;
    create or replace package body company_package is
    function f_getCompany(company_id number) return company_arr is
    comp_array company_arr;
    comp_object company_obj;
    dept_array dept_arr;
    dept_object dept_obj;
    begin
    dept_object := dept_obj(100, 'Dept 1');
    dept_array := dept_arr();
    dept_array.extend;
    dept_array(1) := dept_object;
    dept_object := dept_obj(110, 'Dept 2');
    dept_array.extend;
    dept_array(2) := dept_object;
    comp_object := company_obj(1, 'Company A', dept_array);
    comp_array := company_arr();
    comp_array.extend;
    comp_array(1) := comp_object;
    number_of_times := number_of_times + 1;
    dbms_output.put_line('number of times = ' || number_of_times);
    return comp_array;
    end;
    end company_package;
    ----------------------------------------------------------------------------------------------------

    I noticed that myself in our project.
    Our varchars2 are defined as VARCHAR2(xxx CHAR) - OWB puts the size*4
    In fact if you have special characters like umlauts (ü,ä,ö,...) it will use 4 bytes per character.
    You can try it yourself. Define a Varchar2(1 CHAR) and manually change the size of the Column in your mapping inside OWB (in filters, joins or your target table).
    Then shoot an umlaut through the mapping and will end up with a "too small" error.
    Dont mind the size*4 issue - we totally ignored it and run without error since 4 years now.

  • Is this a bug in OWB 11.2 - importing table metadata for character columns

    The Oracle® Warehouse Builder Data Modeling, ETL, and Data Quality Guide provides an overview of the data types supported.
    http://docs.oracle.com/cd/E11882_01/owb.112/e10935/orcl_data_objx.htm
    It says that for VARCHAR2 data type it saws (http://docs.oracle.com/cd/E11882_01/owb.112/e10935/orcl_data_objx.htm#CHDFIADI )
    "Stores variable-length character data. How the data is represented internally depends on the database character set. The VARCHAR2 data type takes a required parameter that specifies a maximum size up to 4,000 characters"
    That means , I guess, it says that when I import a table, any columns of type VARCHAR2(10) in the database should have its length show as characters in OWB, so a column of type Varchar2(10) in the Oracle database, should be shown as Varchar2(10) when imported into OWB table metadata via the OWB import function.
    However, if I have a database that set-up as a single-byte and import a table using the OWB import function a column that has a size of e.g. 10 in the database, is imported as OWB table metadata and the size is 10. Correct, I am happy.
    However, if the database is modified to support multi-byte characters, ALTUF16 encoding with the semantics set to "CHAR", then when I import the same table into OWB, OWB reports the size as 40, I guess its 40 bytes as in 10 characters @ 4 bytes per character.
    Is this a bug in OWB, as the datatype in the Oracle DB is varchar2(10), should OWB after importing a table not also report the column as VARCHAR2(10) ? Currently, is shows the column as varchar2(40).

    I noticed that myself in our project.
    Our varchars2 are defined as VARCHAR2(xxx CHAR) - OWB puts the size*4
    In fact if you have special characters like umlauts (ü,ä,ö,...) it will use 4 bytes per character.
    You can try it yourself. Define a Varchar2(1 CHAR) and manually change the size of the Column in your mapping inside OWB (in filters, joins or your target table).
    Then shoot an umlaut through the mapping and will end up with a "too small" error.
    Dont mind the size*4 issue - we totally ignored it and run without error since 4 years now.

  • JDev 9.0.3, Business comp wizard, is this a bug?

    Howdy,
    Found something that perhaps is a bug, hoping you guys have fixed for the real release.
    1) Create a database connection, but don't fill in username/password. Don't check deploy password.
    2) Create new workspace and project.
    3) create new business component package in the project. On step 2, point Connection name to username/password-less connection. Alert says prompt will ask for credentials. No matter what I put in, with valid username/password entries, a Connect Error pops saying invalid arguments in call. Exception: oracle.jdeveloper.cm.CMException.
    Is this a bug? We're using dynamic credentials in our app with data sources, so username/password is left off.
    Thanks,
    Joe Tseng
    Technical Management Consultant
    TUSC
    [email protected]

    Joe,
    I've filed Bug#2561459 to track this problem.

  • Bug in Oracle JDBC Pooling Classes - Deadlock

    We are utilizing Oracle's connection caching (drivers 10.2.0.1) and have found a deadlock situation. I reviewed the code for the (drivers 10.2.0.3) and I see the same problem could happen.
    I searched and have not found this problem identified anywhere. Is this something I should post to Oracle in some way (i.e. Metalink?) or is there a better forum to get this resolved?
    We are utilizing an OCI driver with the following setup in the server.xml
    <ResourceParams name="cmf_toolbox">
    <parameter>
    <name>factory</name>
    <value>oracle.jdbc.pool.OracleDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>user</name>
    <value>hidden</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>hidden</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:oci:@PTB2</value>
    </parameter>
    <parameter>
    <name>connectionCachingEnabled</name>
    <value>true</value>
    </parameter>
    <parameter>
    <name>connectionCacheProperties</name>
    <value>(InitialLimit=5,MinLimit=15,MaxLimit=75,ConnectionWaitTimeout=30,InactivityTimeout=300,AbandonedConnectionTimeout=300,ValidateConnection=false)</value>
    </parameter>
    </ResourceParams>
    We get a deadlock situation between two threads and the exact steps are this:
    1) thread1 - The OracleImplicitConnectionClassThread class is executing the runAbandonedTimeout method which will lock the OracleImplicitConnectionCache class with a synchronized block. It will then go thru additional steps and finally try to call the LogicalConnection.close method which is already locked by thread2
    2) thread2 - This thread is doing a standard .close() on the Logical Connection and when it does this it obtains a lock on the LogicalConnection class. This thread then goes through additional steps till it gets to a point in the OracleImplicitConnectionCache class where it executes the reusePooledConnection method. This method is synchronized.
    Actual steps that cause deadlock:
    1) thread1 locks OracleImplicitConnectionClass in runAbandonedTimeout method
    2) thread2 locks LogicalConnection class in close function.
    3) thread1 tries to lock the LogicalConnection and is unable to do this, waits for lock
    4) thread2 tries to lock the OracleImplicitConnectionClass and waits for lock.
    ***DEADLOCK***
    Thread Dumps from two threads listed above
    thread1
    Thread Name : Thread-1 State : Deadlock/Waiting on monitor Owns Monitor Lock on 0x30267fe8 Waiting for Monitor Lock on 0x509190d8 Java Stack at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:214) - waiting to lock 0x509190d8> (a oracle.jdbc.driver.LogicalConnection) at oracle.jdbc.pool.OracleImplicitConnectionCache.closeCheckedOutConnection(OracleImplicitConnectionCache.java:1330) at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.runAbandonedTimeout(OracleImplicitConnectionCacheThread.java:261) - locked 0x30267fe8> (a oracle.jdbc.pool.OracleImplicitConnectionCache) at oracle.jdbc.pool.OracleImplicitConnectionCacheThread.run(OracleImplicitConnectionCacheThread.java:81)
    thread2
    Thread Name : http-7320-Processor83 State : Deadlock/Waiting on monitor Owns Monitor Lock on 0x509190d8 Waiting for Monitor Lock on 0x30267fe8 Java Stack at oracle.jdbc.pool.OracleImplicitConnectionCache.reusePooledConnection(OracleImplicitConnectionCache.java:1608) - waiting to lock 0x30267fe8> (a oracle.jdbc.pool.OracleImplicitConnectionCache) at oracle.jdbc.pool.OracleConnectionCacheEventListener.connectionClosed(OracleConnectionCacheEventListener.java:71) - locked 0x34d514f8> (a oracle.jdbc.pool.OracleConnectionCacheEventListener) at oracle.jdbc.pool.OraclePooledConnection.callImplicitCacheListener(OraclePooledConnection.java:544) at oracle.jdbc.pool.OraclePooledConnection.logicalCloseForImplicitConnectionCache(OraclePooledConnection.java:459) at oracle.jdbc.pool.OraclePooledConnection.logicalClose(OraclePooledConnection.java:475) at oracle.jdbc.driver.LogicalConnection.closeInternal(LogicalConnection.java:243) at oracle.jdbc.driver.LogicalConnection.close(LogicalConnection.java:214) - locked 0x509190d8> (a oracle.jdbc.driver.LogicalConnection) at com.schoolspecialty.cmf.yantra.OrderDB.updateOrder(OrderDB.java:2022) at com.schoolspecialty.cmf.yantra.OrderFactoryImpl.saveOrder(OrderFactoryImpl.java:119) at com.schoolspecialty.cmf.yantra.OrderFactoryImpl.saveOrder(OrderFactoryImpl.java:67) at com.schoolspecialty.ecommerce.beans.ECommerceUtil.saveOrder(Unknown Source) at com.schoolspecialty.ecommerce.beans.ECommerceUtil.saveOrder(Unknown Source) at com.schoolspecialty.ecommerce.beans.UpdateCartAction.perform(Unknown Source) at com.schoolspecialty.mvc2.ActionServlet.doPost(ActionServlet.java:112) at com.schoolspecialty.ecommerce.servlets.ECServlet.doPostOrGet(Unknown Source) at com.schoolspecialty.ecommerce.servlets.ECServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.schoolspecialty.ecommerce.servlets.filters.EcommerceURLFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)

    We used a documented option to abandon connects in the case of an unforeseen error. The consequence of using this option was not a graceful degradation in performance but a complete lockup of the application. The scenario in which we created a moderate number of abandoned connections was a rare error scenario but a valid test.
    How could this not be a bug in the Oracle driver? Is dead-lock a desireable outcome of using an option? Is dead-lock ever an acceptable consequence of using a feature as documented?
    Turns out other Oracle options to recover from an unexpected error also incur a similar deadlock (TimeToLiveTimeout).
    I did a code review of the decompiled drivers and it clearly shows the issue, confirming the original report of this issue. Perhaps you have evidence to the contrary or better evidence to support your statement "not a bug in Oracle"?
    Perhaps you are one of the very few people who have not experience problems with Oracle drivers? I've been using Oracle since 7.3.4 and it seems that I have always been working around Oracle JDBC driver problems.
    We are using Tomcat with the OracleDataSourceFactory.

  • Bug in Oracle XSchema Processor for Java v1 (recently released)

    Running the sample file is giving the following error. Is this a bug
    Thanks
    Exception in thread "main" java.lang.NoSuchMethodError
    at oracle.xml.parser.schema.XSDBuilder.initParser(XSDBuilder.java:260)
    at oracle.xml.parser.schema.XSDBuilder.build(XSDBuilder.java:179)
    at XSDSetSchema.main(XSDSetSchema.java:24)
    null

    ah, yes. the 1k limit again. fantastic...
    code (note: this is hardcoded and terribly unpolished...but it works...):
    import javax.security.auth.login.Configuration;
    import javax.security.auth.login.AppConfigurationEntry;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.util.HashMap;
    import java.util.Map;
    public class CITestAuthenticationConfiguration extends Configuration { 
    private static ArrayList appConfigurationList = new ArrayList();
    public CITestAuthenticationConfiguration(){}
    public AppConfigurationEntry[] getAppConfigurationEntry(String applicationName){
    Map map = new HashMap();
    AppConfigurationEntry ace = new AppConfigurationEntry(
    "CITestLoginModule",
    AppConfigurationEntry.LoginModuleControlFlag.REQUIRED,
    map
    AppConfigurationEntry[] aceArray = new AppConfigurationEntry[1];
    aceArray[0] = ace;
    return aceArray;
    public void refresh()
    // Right now this is a load once scheme and we will not implement the
    // refresh method
    public static boolean addAppConfigurationEntry ( String flag, String module, String options )
    // REMOVED FOR BREV[i]Long postings are being truncated to ~1 kB at this time.

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • Bug in Oracle

    Sir,i know it very clearly that ,primary key column ,can not be null.
    But the bug in oracle is that,
    when first time ,i tried to ALTER the primary key column in the table,to accept NULL,
    oracle shows the message that ,"TABLE ALTERED."
    But when i queried the USER_TAB_COLUMNS,data dictionary ,i found that the primary column,is actually NOT ALTERED AT ALL,TO ACCEPT NULL VALUES.
    Although oracle is enforcing the rule that,PRIMARY KEY COLUMN CAN NOT BE NULL ,but how ORACLE GENERATED THE FALSE MESSAGE THAT -"Table Altered".
    where as the DDL operation was not successful.
    But when second time ,i tried to ALTER the primary key column,to accept NULL,
    oracle shows the message that ,
    ORA-01451: column to be modified to NULL cannot be modified to NULL
    So what i am saying is that,why oracle show me the correct ,message ,
    "ORA-01451: column to be modified to NULL cannot be modified to NULL",
    at the second time DDL operation ,rather than showing me at the first time DDL operation.
    And how even if ,at the first time, the DLL operation was not successful,
    how oracle shows the false message that "Table Altered".
    Please go through the steps as i have mentioned below ,to ALTER TABLE,then you can find the problem.
    I have gone through steps like this.
    -->Suppose in a Employee table,EMP_ID column is primary key
    -->I tried to alter EMP_ID column to accept NULL values,
    but it generates error
    ALTER TABLE EMPLOYEE
    MODIFY (EMP_ID NULL);
    ORA-01451: column to be modified to NULL cannot be modified to NULL
    -->So i tried ,to alter EMP_ID column to NOT NULL,
    and i got message ,Table altered.
    ALTER TABLE EMPLOYEE
    MODIFY (EMP_ID NOT NULL);
    -->Then i tried to alter EMP_ID column to accept NULL values,
    but THIS TIME IT DOES NOT GENERATES ANY ERROR,
    and i got message ,Table altered.
    ALTER TABLE EMPLOYEE
    MODIFY (EMP_ID NULL);
    But when again ,i run the same statement again,it generates error
    ORA-01451: column to be modified to NULL cannot be modified to NULL

    Please don't post duplicate threads.
    {thread:id=1100939}

  • Bug in Oracle 10.2.0.1.0-10.2.0.3.0: Sorted Hash Cluster

    I found another bug in Oracle:
    SQL> create cluster tfsys_cluster
    2 (
    3 name varchar2(30),
    4 cdp number(6),
    5 stime number(6) sort)
    6 hashkeys 1000
    7 size 100;
    SQL> create table tfsys(
    2 name varchar2(30) not null,
    3 cdp number(6) not null,
    4 stime number(6) not null,
    5 data number(10,2))
    6 cluster tfsys_cluster(name, cdp, stime);
    SQL> alter table tfsys add constraint tfsys_pk primary key(name, cdp, stime);
    SQL> begin
    2 for i in 1..5 loop
    3 insert into tfsys values('IANC', 1, i, 15.25 + i);
    4 end loop;
    5 end;
    6 /
    SQL> commit;
    SQL> select * from tfsys where name='IANC' and cdp=1 and stime <= 3;
    NAME CDP STIME DATA
    IANC 1 1 16,25
    IANC 1 2 17,25
    IANC 1 3 18,25
    SQL> select * from tfsys where name='IANC' and cdp=1 and stime < 3;
    NAME CDP STIME DATA
    IANC 1 1 16,25
    IANC 1 2 17,25
    IANC 1 3 18,25
    SQL> select * from tfsys where name='IANC' and cdp=1 and trunc(stime) < 3;
    NAME CDP STIME DATA
    IANC 1 1 16,25
    IANC 1 2 17,25
    This bug exists in Oracle 10.2.0.1.0-10.2.0.3.0 for Windows installation, for example in Oracle 10.1.0.3.1 for Red Hat 3 this query work right.

    FWIW I have not been able to reproduce your problem on Windows.
    I am getting the same results in Windows and Linux.
    You should check if the execution plan is different in both cases

  • Bug in oracle embedded http listener

    Hi there,
    I've discovered a bug in the Oracle embedded http listener for our Oracle on RHEL database version 11.1.0.6 where it will return HTTP-400 bad request errors if a cookie is created with a bare comma in the cookie value. To see for yourself, simply create an apex application with an open door authentication and enter a username with a comma in it - page 101 writes the username to a cookie, and then you get HTTP-400 errors.
    I'll raise this as a bug at Oracle, but in the meantime I'm frantically trying to figure out a workaround. We have a production site using a standard Apache frontend that we link to Apex applications using mod_rewrite. There are other applications on the site (invision powerboard) which create cookies with bare commas, so we have no control over the creation of these maligned cookies. My thinking is that we might be able to use mod_rewrite rules to weed out the offending cookies and encode the commas so that things continue to work.
    Can anyone assist with a workaround?
    Many thanks,
    Mike

    Hi Mike,
    perhaps you can try to modify the cookies on the client?
    http://scripts.franciscocharrua.com/javascript-cookies.php
    Or is it already too late so that you cannot even run the first procedure to inject the javascript code into the first page?
    Or, you could configure the DAD to run a stored procedure before anything else:
    PlsqlBeforeProcedure
    http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_epg.htm
    If this is already too late, your only option seems to be to use an Apache as a proxy and modify the cookie value there.
    Regards,
    ~Dietmar.

  • BUG in Oracle SQL Developer 3.0.04 on the "generating DLL" with comments?

    I'm newbie on oracle, but I think that I found out a bug in Oracle SQL Developer version 3.0.04 on the "generating DLL" tool using "comments".
    I will describe the steps that I gave:
    I created a view, but after I test it I had to change my “where” condition, so I comment the old code and then I wrote the new “where” condition below. After I done that I tried to look at the sql code of my view using “generating DLL” tool, but oracle sql developer only shown me half of the code, a lot of code were missing. Then I began with some test trying to understand what happen and I notice that if I put an invalid sql code in my comment the generating DLL start working with no problems, for example(pseudo-code):
    (COMMENT WITH VALID SQL CODE the "Generating SQL" don't work:)
    CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
    AS
    SELECT column1, column2
    FROM table1
    INNER JOIN
    (SELECT
    FROM table2
    INNER JOIN .....
    INNER JOIN ....
    --where time_stamp = (select max(time_stamp) from .....)
    WHERE time_stamp >= TRUNC(sysdate)
    ) t1 ON t1.ID = ....
    AND ..... >= TRUNC(sysdate)
    ORDER BY ....
    Generating DLL returns this(when the error occurs):
    CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
    AS
    (COMMENT WITH VALID SQL CODE the "Generating SQL" work with no problems:)
    CREATE OR REPLACE VIEW <user>.<view_name> ( <column1>,<column2> )
    AS
    SELECT column1, column2
    FROM table1
    INNER JOIN
    (SELECT
    FROM table2
    INNER JOIN .....
    INNER JOIN ....
    --where
    WHERE time_stamp >= TRUNC(sysdate)
    ) t1 ON t1.ID = ....
    AND ..... >= TRUNC(sysdate)
    ORDER BY ....
    I believe that "Generating DLL" tool have some problem with the comments, I also used /*...*/ to comment but the problem is still active.
    I notice as well that if I started to add some more comments along the code, the conditions migth change, so I think the problem is related with "comments" code.
    Would you mind telling me if this is a real bug or if I'm doing anything wrong.
    Thank you in advance,
    Rodrigo Campos
    Edited by: 894886 on 3/Nov/2011 5:29

    Hi Rodrigo,
    Thank you for reporting this. The only bug I see currently logged on a comment affecting the generated View DDL involves ending the last line of the definition with a comment, which treats the ending semi-colon (even if on a different line) as part of the comment. That is actually related to a low-priority bug against an Oracle database API.
    Unfortunately, your pseudo-code is a bit complex. Trying a few quick, simpler tests against the standard HR schema did not reproduce the issue. I tried INNER JOIN, and nested SELECTs. It would help greatly if you could provide a test case compilable against one of the standard schema, like HR or SCOTT.
    Regards,
    Gary
    SQL Developer Team

Maybe you are looking for

  • How do I track a hub return to BT?

    I recently had my internet go out completely for most of a day.  I called BT to find out if there was trouble in my area and was told no.  When I contacted BT I spent an hour on the phone with them trying this and that and testing things to try to ge

  • Mismatch between Print preview and printout

    Respected Guru's Output device was defined during Febuary, and printout was taken without trouble untill today. Suddenly the print preview and printout does not match, title "INVOICE" printed at the top of the sheet is missing, whereas appears in the

  • Image bytea doesn't appear on CR.

    It doesn't appear to be possible to display images stored in a PostgreSQL database on a report in the CR report designer. PostgreSQL databases usually store images in a column of type "bytea".  The Field Explorer in CR shows this as a String[-1] type

  • Remote debugging in OC4J using JDeveloper

    I need to remote debug into a stand-alone OC4J using JDeveloper 10.1.3.1.0. The documentation says the following: In the <jdev_install>/jdev/lib directory, copy ojc.jar and jdev-remote.jar to <OC4J_HOME>/home/lib. I can't find directory "<OC4J_HOME>/

  • Reinstall Dreamweaver 8 without disc

    Hi, the company I work for has a Box for Dreamweaver but no CD.... We think someone might have taken the disc. I have the serial # for Dreamweaver and need to reinstall it. I do I go about it? DO I need to buy Dreamweaver again? Or can I redownload v