[svn] 2236: Allow implicit conversion of Vector. * to Vector. T in strict mode.

Revision: 2236<br />Author:   [email protected]<br />Date:     2008-06-25 11:48:59 -0700 (Wed, 25 Jun 2008)<br /><br />Log Message:<br />-----------<br />Allow implicit conversion of Vector.<*> to Vector.<T> in strict mode.<br /><br />Modified Paths:<br />--------------<br />    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/util/Context.java

For some reason it just started to work now. Have no idea what didn't work before.

Similar Messages

  • Implicit Conversion from data type sql_variant to datetime is not allowed.

     Getting a odd error. This code was working perfectly before a SQLServer upgrade.
    The linked database is working, I'm able to pull up data from it in separate queries just fine.
    I'm getting the following error.
    Implicit conversion from data type sql_variant to datetime is not allowed. Use the CONVERT function to run this query.
    Invalid column name 'TotalDay'. (.Net SqlClient Data Provider)
    can anyone spot the issue? I've tried sever variations of the same code, but still get the same thing.
    If I put this section in a query by it self it works just fine.
    ( DATEDIFF(ss,
    CONVERT(VARCHAR(10),( SELECT TOP ( 1 )
    TimeDate
    FROM [nav].AcsLog.dbo.EvnLog AS X3
    WHERE UDF2 = E.No_
    AND CONVERT(VARCHAR(10), X3.TimeDate, 101) = CONVERT(VARCHAR(10), @sdate, 101)
    ORDER BY TimeDate ASC
    ),101),
    CONVERT(VARCHAR(10),( SELECT TOP ( 1 )
    TimeDate
    FROM [nav].AcsLog.dbo.EvnLog AS X4
    WHERE UDF2 = E.No_
    AND CONVERT(VARCHAR(10), X4.TimeDate, 101) = CONVERT(VARCHAR(10), @sdate, 101)
    ORDER BY TimeDate DESC
    ),101)) ) AS TotalDayBadge ,

    >ANDCONVERT(VARCHAR(10),X3.TimeDate,101)=CONVERT(VARCHAR(10),@sdate,101)
    It is not a good idea to use string dates for predicates in WHERE clauses.
    Use DATETIME or DATE in predicates.
    If you are not interested in the time part of DATETIME, use DATE datatype.
    Example:
    SELECT CONVERT(DATE, getdate());
    -- 2014-08-25
    Datetime conversions:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Between dates:
    http://www.sqlusa.com/bestpractices2008/between-dates/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Implicit conversion of "TEXT" to "VARCHAR"

    Running jdk1.6.0_12, Linux RHE, Sybase 12.5 and connection with jconn3.jar
    Have a table with a column of type varchar(50)
    Was able to isolate the problem to this column, as the SQLException was thrown from the line "stmt.setString("@<colname>", <value>);"
    In doing ~14,000 individual inserts in 30 min I had two Exceptions thrown (Implicit conversion of "TEXT" to "VARCHAR" is not allowed), both at the same place and both repeatable. I put a print statement in the catch block and found that both were inserting the same 6 character string.
    Ran all the docs several times more and got the same number of failures on the same files.
    Querying the database I found that I had almost 5,000 other insert of the same string which were sucessful.
    Not able to identify what was different about the two failures, no unprintable characters, etc.
    Is this a JDBC issue or Sybase?
    What are the reasons that would cause this exception to be thrown when inserting 6 characters into a hole for 50?
    other ideas?
    Edited by: jjones3566 on Feb 17, 2009 10:50 AM

    jjones3566 wrote:
    Running jdk1.6.0_12, Linux RHE, Sybase 12.5 and connection with jconn3.jar
    Have a table with a column of type varchar(50)
    Was able to isolate the problem to this column, as the SQLException was thrown from the line "stmt.setString("@<colname>", <value>);"
    In doing ~14,000 individual inserts in 30 min I had two Exceptions thrown (Implicit conversion of "TEXT" to "VARCHAR" is not allowed), both at the same place and both repeatable. I put a print statement in the catch block and found that both were inserting the same 6 character string.
    Ran all the docs several times more and got the same number of failures on the same files.
    Querying the database I found that I had almost 5,000 other insert of the same string which were sucessful.That could an invalid assumption. The fact that they displayed the same does not make them the same.
    You would need to print the integer value of each character to insure they are the same.
    You should do that starting with the source and NOT what is in the database.
    If different then that is the source of the problem.
    If the same then it is probably just a bug in the driver/database which you are stuck with. Various solutions would be to try a conversion (format the SQL to take a text and convert to varchar) or trying playing with the commit level (commit 50 versus 5000 or whatever.)

  • Why index is not used if oracle have to do implicit conversion?

    my db version: 10gR2
    I created bitmap index on each of the column used in below sql.
    the datatype of all three columns are VARCHAR2,
    while i am using NUMBER in the query, which means oracle needs to do the implicit conversion before running the sql.
    the problem is that, when I use NUMBER as below, execution plan will not use bitmap indexes at all.
    but when I use STRING instead, it will make use of those bitmap indexes.
    select  FI_YTD,1,2,FI_KPI_ID
      from DM_F_FI_ALL_KPI
      where
        FI_KPI_ID=4140
        and FI_PERIOD=201012
        and FI_ORG_ID=10000000;So, I wonder why? how the implicit conversion affects the access path?
    Edited by: PhoenixBai on Jan 30, 2011 10:52 AM
    Edited by: PhoenixBai on Jan 31, 2011 9:21 AM --added database version as 10gR2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    sybrand_b wrote:
    Implicit conversion in Oracle is always done like this
    empno='10'
    is rewritten as
    to_char(empno)='10'
    Now you have <function>(<indexed columnn>) = <hardcoded literal>
    Oracle never puts a conversion function at the right hand side of the expresssion. NEVER.
    SQL> create table emp as select * from scott.emp;
    Table created.
    SQL> alter table emp add constraint emp_pk primary key (empno);
    Table altered.
    SQL> @desc emp
    Name                                      Null?    Type
    EMPNO                                     NOT NULL NUMBER(4)
    ENAME                                              VARCHAR2(10)
    JOB                                                VARCHAR2(9)
    MGR                                                NUMBER(4)
    HIREDATE                                           DATE
    SAL                                                NUMBER(7,2)
    COMM                                               NUMBER(7,2)
    DEPTNO                                             NUMBER(2)
    SQL> select * from emp where empno = '10'
      2
    SQL> @xplan
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Compatibility is set to 11.2.0.0.0
    Plan hash value: 4024650034
    | Id  | Operation                   | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |        |     1 |    87 |     1   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMP    |     1 |    87 |     1   (0)| 00:00:01 |
    |*  2 |   INDEX UNIQUE SCAN         | EMP_PK |     1 |       |     0   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("EMPNO"=10)Edited by: William Robertson on Jan 30, 2011 12:56 PM - added DESCRIBE

  • Implicit conversion

    doesnot oracle implicitly convert varchar(2) to date in round and trunc functions?

    Hi,
    f7218ad2-7d9f-4e71-ba26-0d6e4b38f87e wrote:
    doesnot oracle implicitly convert varchar(2) to date in round and trunc functions?
    ROUND and TRUNC do not take VARCHAR2s fior the 1st argument.  They take either NUMBERs or DATEs.  If you try to call them with any other data type, you are asking for trouble.  Sometimes you get what you ask for.  There is no reason to call either with the wrong type of argument.
    If you do call ROUND or TRUNC with a VARCHAR2 1st argument, even though you know it's a terrible idea, Oracle will try to convert it.  Whether it tries to convert it to a NUMBER or a DATE may depend on the string and/or your NLS settings, though it seems to always try to conver to a NUMBER.
    Implicit conversions are never necessary.  Explicit conversions are always simple.  Always use the correct datatype.  If you must convert from one datatype to anopther, use an explicit conversion.

  • Implicit conversion issue

    Dear Sir,
    Does latest Oracle9i JDBC driver not support implicitly converting string to date?
    I try to execute "INSERT INTO TABLE DATETYPECOLUMN VALUES '2007-07-24 17:40:00' ".
    It works well using driver version 9.2.0.1, 9.2.0.3, 9.2.0.4, 9.2.0.5, but can't work using version 9.2.0.7, 9.2.0.8.
    So, why latest version doesn't cover legacy version?
    Thanks for your great help!
    Best regards,
    Brian

    Dear Avi,
    Thanks for your suggestion!
    As you said, I try not to modify the code because it involves many systems.
    So, the temporary solution is using legacy version JDBC driver but I'm not sure does legacy driver have any problem or not.
    I had tried to use JDBC driver version 10.2.0.2 and it produced the same result : ORA-01861: literal does not match format string.
    (My java version is jdk142_11.)
    I searched the readme doc. on Oracle JDBC driver download page, I can't find if latest verison driver doesn't support implicit conversion.
    Does the drivers after 9.2.0.7 really not support it?
    Thanks for your great help again!
    Best regards,
    Brian

  • Disallowed implicit conversion from data type datetime to data type timestamp

    Received error: [Macromedia][SQLServer JDBC
    Driver][SQLServer]Disallowed implicit conversion from data type
    datetime to data type timestamp, table 'myTbl', column 'duration'.
    Use the CONVERT function to run this query.
    I have a field named duration hh:mm:ss.lll that I am trying
    to insert into MS SQL. DB has field defined as [duration]
    [timestamp] NOT NULL,
    My insert has this: INSERT INTO myTbl( duration) VALUES(
    <cfqueryparam value="2006-05-26 11:12:13"
    cfsqltype="CF_SQL_TIMESTAMP"/> )
    Why does this not work? rrrrrrrrrrrrrr! BTW: also tried with
    seconds as 13.111 which did not work. Does the db duration need to
    be date? I just want to store a duration for the time of a movie...
    10 Q

    quote:
    Originally posted by:
    quiet1
    Received error: [Macromedia][SQLServer JDBC
    Driver][SQLServer]Disallowed implicit conversion from data type
    datetime to data type timestamp, table 'myTbl', column 'duration'.
    Use the CONVERT function to run this query.
    I have a field named duration hh:mm:ss.lll that I am trying
    to insert into MS SQL. DB has field defined as [duration]
    [timestamp] NOT NULL,
    My insert has this: INSERT INTO myTbl( duration) VALUES(
    <cfqueryparam value="2006-05-26 11:12:13"
    cfsqltype="CF_SQL_TIMESTAMP"/> )
    Why does this not work? rrrrrrrrrrrrrr! BTW: also tried with
    seconds as 13.111 which did not work. Does the db duration need to
    be date? I just want to store a duration for the time of a movie...
    10 Q
    Duration as a timestamp? How odd, most people would store it
    as an integer. Or, if you want to build your own string, the syntax
    is {ts 'yyyy-mm-dd hh:mm:ss'}. The seconds might not be required.
    In any event, use createodbcdatetime() for the value you want
    to put into your table.

  • When implicit conversion takes place

    hi all,
    I have two queries say
    sql>SELECT * FROM EMP WHERE HIREDATE BETWEEN '20-FEB-81' AND '20-FEB-82';
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
    7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
    7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
    7782 10 deleted MANAGER 7839 09-JUN-81 2450 10
    7839 10 deleted PRESIDENT 17-NOV-81 5000 10
    7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
    7900 JAMES CLERK 7698 03-DEC-81 950 30
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    7934 10 deleted CLERK 7782 23-JAN-82 1300 10
    AND
    sql>select '17-SEP-2010'+1 from dual;
    ERROR at line 1:
    ORA-01722: invalid number
    now in the first case i have passed a string and that got converted into a date
    but in the second case i am trying to add one day to the entered date it is not getting converted in the second case.
    when actually is implicit conversion done.
    thanks and regards,
    sri ram.

    I'd like to recommand you NEVER to rely on IMPLICIT conversion. It depends on the NLS_DATE_FORMAT parameter. If you supply a VARCHAR that can be converted to a date, it will use this default format to try and convert the date. But this can result of weird result if you don't know what is the NLS_DATE_FORMAT ;-)
    So, as an advice, always pass DATE to function that accept dates by converting them yourself (TO_DATE(a_date, 'the format you want')...
    Cheers,

  • Error on Implicit conversion

    Hey I have a problem to this query, yesterday function normaly, but we reboot the server and now send me this error message:
    Msg 245, Level 16, State 1, Line 1
    Conversion failed when converting the varchar value 'sdv' to data type int.
    this is the query, i wish to know what happend.
    SELECT ZKA.[CHECKTIME], ZKA.[SENSORID], ATT.[DESCRIPTION_EN], ATT.[LOCATION], ATT.[SUBTYPE], UI.[USERID], UI.[NAME], UI.[TITLE]
    FROM [att3000].[dbo].[CHECKINOUT] ZKA
    INNER JOIN [att3000].[dbo].[Universal_Devices] ATT
    ON ZKA.[SENSORID] = ATT.[FOREIGN_ID]
    INNER JOIN [att3000].[dbo].[USERINFO] UI
    ON ZKA.[USERID] = UI.[USERID]
    WHERE ZKA.[CHECKTIME] BETWEEN '2014-06-06 00:00:00.000' AND '2014-06-06 23:59:59.999'
    AND UI.[SSN] = 890 --
    AND ATT.[SUBTYPE] <> 4
    ORDER BY ZKA.[CHECKTIME] ASC

    Check whether one of the following attributes contain a non integer value as implicit conversion is happening here:
    --AND UI.[SSN] = 890 --
    ..AND ATT.[SUBTYPE] <> 4
    SELECT *
    FROM [att3000].[dbo].[USERINFO]
    WHERE ISNUMERIC([SSN]) = 0
    SELECT *
    FROM [att3000].[dbo].[Universal_Devices]
    WHERE ISNUMERIC([SUBTYPE]) = 0
    For a quick check if thee and not the joined columns are the problem, you can also quote the values to be a string instead of a numeric value instead.
    AND UI.[SSN] = '890' --
    AND ATT.[SUBTYPE] <> '4'
    Be aware that ISNUMERIC is not fully checking if the values are only [0-9] or of data types numeric as mentioned here:
    http://www.codeproject.com/Articles/12254/Is-it-really-Numeric
    -Jens
    Jens K. Suessmeyer http://blogs.msdn.com/Jenss

  • Should we replace all implicit conversion by explicit conversion

    Hi all, it's my first post in this forum, correct me if I do something incorrect.
    I just want to discuss this question from the performance point of view, so don't worry about the design or other stuff.
    I have read through many threads and articles, it seems that no one has explained my concern.
    If we replace the implicit conversion by explicit conversion, does it help for the performance?
    For example, I created the following table
    CREATE TABLE student (s_id tinyint, name varchar(20));
    INSERT INTO student VALUES (1,'name1'),(2,'name2'),(3,'name3')
    Does the following two queries make any difference from the performance point of view? As you can see, the first one applies implicit conversion, whereas the second one applies explicit conversion
    SELECT * FROM student WHERE s_id = '2';
    SELECT * FROM student WHERE s_id = CAST('2' AS tinyint);
    I understand that I should query using WHERE s_id = 2, but I just want to make this as a example to understand the difference between implicit and explicit conversion.
    Another related question is when I insert the records, is it better if I Cast the number to tinyint as follows?
    INSERT INTO student VALUES (CAST(4 AS tinyint),'name4')
    Thanks guys

    Hi,
    Implicit conversions leads to scans and can cause performance issue. Can you please refer to below technet article
    http://social.technet.microsoft.com/wiki/contents/articles/24563.sql-server-be-aware-of-the-correct-data-type-for-predicates-in-queries.aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Dynamic creation of new Vector with Vector of Vectors

    All java gurus,
    I am trying to write an application that will generate a vector where at each index there is another vector that contains a set of random float values. So, that is where the Vector of Vectors part comes in. I have figured out by multiple trial and error that inevitably I will need to generate (initialize new Vectors) for as many indicies that I want in the larger vector. Is there a way to do this such that I don't have to type so many calls of Vector x = new Vector(); This is overall going to be used in a Neural Network project and I am trying to write a WeightMatrix whereas each index in the large vector WeightMatrix contain another vector of random float values. Here below is some sample code that I tried but I know doesn't work, but maybe it will give you a better idea of what I am trying to do. Please also respond to [email protected]
    Vector weightMatrix = new Vector(10);
    Vector weights = new Vector(10);
    Random rand = new Random();
    for (int i=0; i < 10; i++) {
         this.weights.clear();
         for (int j=0; j < 10; j++)
              this.weights.add(j, new Float(this.rand.nextFloat()));
         this.weightMatrix.add(i, this.weights);
    }This code is under a class, so the "this" statements are not the problem.
    If you need more info or know of a solution, please email me ([email protected]). Thanks in advance!
    Keith Pemberton

    I figured it out, but this is for future reference for other people that have the same problem. You can use one vector over and over, you just have to set it as a new vector in the 1st for loop. So, you don't need to create tons of individual vectors (ie. Vector1, Vector2, etc...). So, my final code looks like this
    Vector weightMatrix = new Vector(10);
    Vector weights = new Vector(10);
    Random rand = new Random();
    for (int i=0; i < 10; i++) {
        this.weights = new Vector(10);
        for (int j=0; j < 10; j++)
            this.weights.add(j, new Float(this.rand.nextFloat()));
        this.weightMatrix.add(i, this.weights);
    }Hope this helps anyone out there!
    Keith

  • How to remove a value from a vector of vectors

    How can I remove a value from a vector inside another vector, say;
    Vector myvector= new Vector();
    Vector data= new Vector();
    myvector.addElement(rs.getString(1));
    myvector.addElement(rs.getString(2));
    myvector.addElement(rs.getString(3));
    data.addElement(myvector);
    I want to get an element in the Vector "myvector" at index 2.

    import java.util.*;
    public class Test {
      public static void main(String args[]) {
        Vector myvector= new Vector();
        Vector data= new Vector();
        myvector.addElement("Zero");
        myvector.addElement("One");
        myvector.addElement("Two");
        data.addElement(myvector);
        System.out.println("main vector initially contains:" + data);
        myvector.remove(1);
        System.out.println("main vector now contains:" + data);
    }Output:
    main vector initially contains:[[Zero, One, Two]]
    main vector now contains:[[Zero, Two]]
    Just to be sure I was correct in the first place. Perhaps you should have done likewise before continuing stick to your guns.

  • How to cast vector to vector with out using loop. and how to override "operator =" of vector for this kind of condition.

    Hi All How to TypeCast in vector<>...  typedef  struct ...  to class... 
    //how to cast the vector to vector cast with out using loop
    // is there any way?
    //================ This is Type Definition for the class of ClsMytype=====================
    typedef struct tagClsMytype
    CString m_Name;
    int m_Index;
    double m_Value;
    } xClsMytype;
    //================ End of Type Definition for the class of ClsMytype=====================
    class ClsMytype : public CObject
    public:
    ClsMytype(); // Constructor
    virtual ~ClsMytype(); // Distructor
    ClsMytype(const ClsMytype &e);//Copy Constructor
    // =========================================
    DECLARE_SERIAL(ClsMytype)
    virtual void Serialize(CArchive& ar); /// Serialize
    ClsMytype& operator=( const ClsMytype &e); //= operator for class
    xClsMytype GetType(); // return the typedef struct of an object
    ClsMytype& operator=( const xClsMytype &e);// = operator to use typedef struct
    ClsMytype* operator->() { return this;};
    operator ClsMytype*() { return this; };
    //public veriable decleare
    public:
    CString m_Name;
    int m_Index;
    double m_Value;
    typedef struct tagClsMyTypeCollection
    vector <xClsMytype> m_t_Col;
    } xClsMyTypeCollection;
    class ClsMyTypeCollection : public CObject
    public:
    ClsMyTypeCollection(); // Constructor
    virtual ~ClsMyTypeCollection(); // Distructor
    ClsMyTypeCollection(const ClsMyTypeCollection &e);//Copy Constructor
    DECLARE_SERIAL(ClsMyTypeCollection)
    virtual void Serialize(CArchive& ar);
    xClsMyTypeCollection GetType();
    ClsMyTypeCollection& operator=( const xClsMyTypeCollection &e);
    ClsMyTypeCollection& operator=( const ClsMyTypeCollection &e); //= operator for class
    void Init(); // init all object
    CString ToString(); // to convert value to string for the display or message proposed
    ClsMyTypeCollection* operator->() { return this;}; // operator pointer to ->
    operator ClsMyTypeCollection*() {return this;};
    public:
    vector <ClsMytype> m_t_Col;
    //private veriable decleare
    private:
    //===================================================
    ClsMytype& ClsMytype::operator=( const xClsMytype &e )
    this->m_Name= e.m_Name;
    this->m_Index= e.m_Index;
    this->m_Value= e.m_Value;
    return (*this);
    //==========================Problem for the vector to vector cast
    ClsMyTypeCollection& ClsMyTypeCollection::operator=( const xClsMyTypeCollection &e )
    this->m_t_Col= (vector<ClsMytype>)e.m_t_Col; // how to cast
    return (*this);
    Thanks in Advance

    Hi Smirt
    You could do:
    ClsMyTypeCollection* operator->() {
    returnthis;};
    // operator pointer to ->
    operatorClsMyTypeCollection*()
    {returnthis;};
    public:
    vector<ClsMytype>
    m_t_Col;//??
    The last line with "vector<xClsMytype>
    m_t_Col;". It compiles but I doubt that is what you want.
    Regards
    Chong

  • How to get data out of Vector of vector ???

    All,
    I have a vector v1 which is getting populated by the resultset of the database. This vector has another two vectors vrow & vcol .
    Code as follows ---
    v1 = new Vector();
    while(rs1.next()) {
         Vector vrow = new Vector();
         for (int i=intstartday ; i <= intendday ; i++)
         {     // here I am getting the new result set for each i //
              ResultSet rs2 = getResultSet();
              while(rs2.next()) {
                   Vector vcol = new Vector();
                   vcol.addElement(rs2.getString("day"));
                   vcol.addElement(rs2.getString("reg_hr"));
                   vcol.addElement(rs2.getString("dateday"));
                   vrow.addElement(vcol);
              rs2.close();                              
         } // for loop end
         vrow.addElement(strChargeNmbr);
         v1.addElement(vrow);                    
    } // end of rs1 resultset while loop
    I need to get the data out of this vector v1. If anyone has any insight on this - how to get the data from vectors which has differnt type of objects in it , please send me the code example asap.
    thanx

    Thanks for your suggestion. It is working now except that I am having problems in getting the charge NUmber out....Charge NUmber is nothing but a String.
    So my row Vector has two values
    1. Check the code where I am populating the Vectors
    while(rs1.next()) {
    strsubmittime = rs1.getString("SUBMIT_TS");
    strapprovetime = rs1.getString("APP_DIS_TS");
    strapprempid = rs1.getString("APP_DIS_EMP_ID");
    strChargeNmbr = rs1.getString("entered_cn");               
    Vector vLaborrow = new Vector();
    for (int i=intstartday ; i <= intendday ; i++)
    // here execute the query and get the result set for every i //                         ResultSet rs2 = getResultSet();
         while(rs2.next()) {
         Vector vLaborcol = new Vector();
         vLaborcol.addElement(rs2.getString("day"));
         vLaborcol.addElement(rs2.getString("reg_hr"));
         vLaborcol.addElement(rs2.getString("dateday"));
         vLaborrow.addElement(vLaborcol);
    } // for loop end
    vLaborrow.addElement(strChargeNmbr);
    vLabor.addElement(vLaborrow);
    } // end of rs1 resultset while loop
    2. check out the following code where I am trying to get the Charge NUmber values out.--
    for(int i=0;i<vLabor.size() ;i++)
    Vector rowVec = (Vector)vLabor.elementAt(i);
    for(int j=0; j< rowVec.size() -1 ; j++)
    try
         if (j==0) {
    String strChargeNmbr = (String)rowVec.elementAt(j) ;
    Vector laborcol = (Vector)rowVec.elementAt(j);
    String day = (String)laborcol.elementAt(0);
    String reg_hr = (String)laborcol.elementAt(1);
    String dateday = (String)laborcol.elementAt(2);
    strChargeNmbr = strChargeNmbr + " " + reg_hr ;
    }catch(ClassCastException e){
         System.out.println("Reading in vector2");
    } // end of j for loop
    System.out.println(strChargeNmbr);
    } // end of i for loop
    I am getting the following Exception --
    "Reading in vector2"
    Please send me the code -- how to get the Charge NUmber out. I am confused where to get the value - is it in the first for loop or second for loop ??

  • ORA-01722: invalid number - Error during implicit conversion (10g vls 11g)

    I am facing oracle error for few SELECT queries in 11g which were working fine in 10g environment.
    Oracle Version:
    10g - 10.2.0.5.0
    11g - 11.2.0.3.0
    We are storing numeric values under CHAR or VARCHAR2 column in few tables. This is known design issue & it can't be changed for now.
    I know this will work fine until all the data is numeric in those columns for respective table. Because by some reason, if any row got character value for that column then implicit string to number conversion will fail and this error can occur. But I have verified that there is no data issue.
    But I can see difference in the execution plan! But not able to recognize the reason issue.
    Any other pointers on why the queries are failing in 11g would be of great help..
    Example SQL:
    Note that table structure and data is same in both the environments.
    View Definition -
    CREATE OR REPLACE FORCE VIEW CIMSOS.LC_LOCATIONS
    (   COUNTRY_ID,    PRODUCTID,
       LANGUAGE_ID,   LOCATION_NAME,
       LOCATION_SHORT_NAME,   TAG_ID,   LOCATION_DEFINITION,
       COMPOSITEKEY,   GLOBAL_LOCATION_KEY,
       CPRODUCTKEYID,   CMODVERSION)
    AS
       SELECT
              CCOUNTRY_ID AS COUNTRY_ID,
              CPRODUCTID AS PRODUCTID,
              CLANGUAGE_CODE AS LANGUAGE_ID,
              CLOCATION_NAME AS LOCATION_NAME,
              CLOCATION_SHORT_NAME AS LOCATION_SHORT_NAME,
              CTAG_ID AS TAG_ID,
              CLOCATION_DEFINITION AS LOCATION_DEFINITION,
              CCOMPOSITEKEY AS COMPOSITEKEY,
              CGLOBAL_LOCATION_KEY0 AS GLOBAL_LOCATION_KEY,
              cproductkeyid,
              cmodversion
         FROM mct_35193, goldencopy
        WHERE     cproductkeyid = productkey
              AND cmodversion = version
              AND catalogid = 35193;Facing issue for SQL query based on above view:
    ** In 10g Env
    SELECT * FROM LC_LOCATIONS WHERE productid = 75;
    -- It executes successfully and provide required results.
    Explain Plan:
    SELECT STATEMENT  ALL_ROWSCost: 12  Bytes: 416  Cardinality: 4                 
         4 NESTED LOOPS  Cost: 12  Bytes: 416  Cardinality: 4            
              1 INDEX RANGE SCAN INDEX CIMSOS.GOLDENCOPY_INDX1 Cost: 10  Bytes: 30,225  Cardinality: 2,015       
              3 TABLE ACCESS BY INDEX ROWID TABLE CIMSOS.MCT_35193 Cost: 1  Bytes: 89  Cardinality: 1       
                   2 INDEX UNIQUE SCAN INDEX (UNIQUE) CIMSOS.XPK_MCT_34342 Cost: 0  Cardinality: 1  ** In 11g Env
    SELECT * FROM LC_LOCATIONS WHERE productid = 75;
    ORA-01722: invalid number
    Explain Plan:
    SELECT STATEMENT  ALL_ROWSCost: 40  Bytes: 8,692  Cardinality: 82            
         3 NESTED LOOPS  Cost: 40  Bytes: 8,692  Cardinality: 82       
              1 TABLE ACCESS FULL TABLE CIMSOS.MCT_35193 Cost: 22  Bytes: 819  Cardinality: 9 
              2 INDEX RANGE SCAN INDEX CIMSOS.GOLDENCOPY_INDX1 Cost: 2  Bytes: 135  Cardinality: 9 
    -- Executes when value is passed as character.
    SELECT * FROM LC_LOCATIONS WHERE productid = '75';

    The problem doesn't appear to be related to the Oracle version, at least not directly. If your query plan does the string to number conversion before eliminating the rows that have non-numeric data, you'll get an error. If the query plan eliminates the rows that have non-numeric data before doing the conversion, the query will succeed. It is entirely possible that you'd get the "bad" plan in 10g or the "good" plan in 11g.
    You can capture the query plans from your 10g database and move them over to the 11g database. Oracle has a nice white paper on upgrading from 10g to 11g that walks you through that process.
    Of course, you really don't want to be dependent on the optimizer picking the "right" plan, you really want to fix the underlying data model issue.
    Justin

Maybe you are looking for

  • How do i connect to itunes with my ipad 2

    I cant see where to open an itunes account to download tunes.once ive done that how do i get these tunes from my ipad to ipad nano?

  • Multiple devices, one Apple ID

    Hi- My husband and I share an Apple ID (multiple email addresses).  He often plugs in his iPhone to sync it to our iMac.  If I plug in my iPhone, will it delete my contacts and sync with what is uploaded to the computer (his contacts)?

  • Unable to install Adobe Flash player for windows 7.

    Can anyone help me with installing Adobe Flash player as it won't load and It doesn't show on my computer?

  • Query for SAP NW 7.0 and ECC

    Dear ALL , We  have purchased SAP NW 7.0  License .We have installed it with 2 components WAS ABAP and WAS as JAVA. Now my question is: this SAP NW 7.0 installation does not contain any functional module like SAP HR.MM,FI  etc... for this requirement

  • Eclipse 1.3.2 window freezes issue, wrong IDE for win 7 or bad config?

    Hi everyone, this is my first thread on this forum...well this is my first thread ever. I wasn't sure where to post my question, but since it is veeeery noobish, I'm posting it here instead of the obscure 'other' development section. I installed the