Inconsistent data types error

I have a query in the VO. No matter what i write, i get the below error.
java.sql.SQLException: ORA-00932: inconsistent datatypes: expected DATE got NUMBER
No matter what i do, i get this error.
The query in the VO is as below
select * from hr_all_positions_f
where trunc(sysdate) between trunc(effective_start_Date) and trunc(effective_end_date)
Please advice.
Thanks

your query works perfectly in sql developer...
as suggested by kumar expand your columns instead of using *
Also check the data types dynamic where clause if any.
--Prasanna                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Inconsistent data type in CASE stmnt

    Hi,
    I have a CASE stmnt inside a select stmnt as follows
    CASE 'UNIT_COST_ANALYST'
    WHEN 'COST_POOLS'
    THEN report_cost_pool_sag_gl_if.cost_pool_type --(1)
    WHEN 'UNIT_COST_ANALYST'
    THEN costpools.unit_cost_analyst --(2)
    ELSE report_cost_pool_sag_gl_if.cp_desc
    END
    Now (1) is a varchar type and (2) is a number type and hence giving me inconsistent data type error.
    How to solve this
    Regards,
    S

    try this
    CASE 'UNIT_COST_ANALYST'
    WHEN 'COST_POOLS'
    THEN report_cost_pool_sag_gl_if.cost_pool_type||'' --(1)
    WHEN 'UNIT_COST_ANALYST'
    THEN costpools.unit_cost_analyst||'' --(2)
    ELSE report_cost_pool_sag_gl_if.cp_desc
    END
    /rms

  • Problems with java constructor: "inconsistent data types" in SQL query

    Hi,
    I tried to define a type "point3d" with some member functions, implemented in java, in my database. Therefor I implemented a class Point3dj.java as you can see it below and loaded it with "loadjava -user ... -resolve -verbose Point3dj.java" into the database.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    package spatial.objects;
    import java.sql.*;
    public class Point3dj implements java.sql.SQLData {
    public double x;
    public double y;
    public double z;
    public void readSQL(SQLInput in, String type)
    throws SQLException {
    x = in.readDouble();
    y = in.readDouble();
    z = in.readDouble();
    public void writeSQL(SQLOutput out)
    throws SQLException {
    out.writeDouble(x);
    out.writeDouble(y);
    out.writeDouble(z);
    public String getSQLTypeName() throws SQLException {
    return "Point3dj";
    public Point3dj(double x, double y, double z)
    this.x = x;
    this.y = y;
    this.z = z;
    public static Point3dj create(double x, double y, double z)
    return new Point3dj(x,y,z);
    public double getNumber()
         return Math.sqrt(this.x*this.x + this.y*this.y + this.z*this.z);
    public static double getStaticNumber(double px, double py, double pz)
         return Math.sqrt(px*px+py*py+pz*pz);
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Additionally, I created the corresponding type in SQL by
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CREATE OR REPLACE TYPE point3dj AS OBJECT EXTERNAL NAME
    'spatial.objects.Point3dj' LANGUAGE JAVA USING SQLDATA (
    x FLOAT EXTERNAL NAME 'x',
    y FLOAT EXTERNAL NAME 'y',
    z FLOAT EXTERNAL NAME 'z',
    MEMBER FUNCTION getNumber RETURN FLOAT
    EXTERNAL NAME 'getNumber() return double',
    STATIC FUNCTION getStaticNumber(xp FLOAT, yp FLOAT, zp FLOAT) RETURN FLOAT
    EXTERNAL NAME 'getStaticNumber(double, double, double) return double')
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After that I tried some SQL commands:
    create table pointsj of point3dj;
    insert into pointsj values (point3dj(2,1,1));
    SELECT x, a.getnumber() FROM pointsj a;Now, the problem:
    Everything works fine, if I delete the constructor
    public Point3dj(double x, double y, double z)
    this.x = x;
    this.y = y;
    this.z = z;
    in the java class, or if I replace it with a constructor that has no input arguments.
    But with this few code lines in the java file, I get an error when executing the SQL command
    SELECT x, a.getnumber() FROM pointsj a;The Error is:
    "ORA-00932: inconsistent data types: an IN argument at position 1 that is an instance of an Oracle type convertible to an instance of a user defined Java class expected, an Oracle type that could not be converted to a java class received"
    I think, there are some problems with the input argument of the constructor, but why? I don't need the constructor in SQL, but it is used by a routine of another java class, so I can't just delete it.
    Can anybody help me? I would be very glad about that since I already tried a lot and also search in forums and so on, but wasn't successful up to new.
    Thanks!

    Dear Avi,
    This makes sense when it is a short code sample (and i think i've done that across various posts), but sometime this is too long to copy/paste, in these cases, i refer to the freely available code samples, as i did above on this forum; here is the quote.
    Look at examples of VARRAY and Nested TABLES of scalar types in the code samples of my book (chapter 8) http://books.elsevier.com/us//digitalpress/us/subindex.asp?maintarget=companions/defaultindividual.asp&isbn=9781555583293&country=United+States&srccode=&ref=&subcode=&head=&pdf=&basiccode=&txtSearch=&SearchField=&operator=&order=&community=digitalpress
    As you can see, i was not even asking people to buy the book, just telling them where to grab the code samples.
    I appreciate your input on this and as always, your contribution to the forum, Kuassi

  • ORA-00932: inconsistent data types: expected NUMBER got BINARY

    ORA-00932: inconsistent data types: expected NUMBER got BINARY
    Hi,
    Could anyone help in resolving my problem?
    I ‘m developing cmp beans in Jbuilder X,
    My database is Oracle 10g, running on Linux and Application server is Oracle10gAs. Running on Windows.
    I can deploy my Entity EJB’s OK and look then up using finder methods as long as I’ve created the data directly in the database using SQL*Plus for instance.
    In the database I have my primary keys defined as type NUMBER
    In my EJB the corresponding number fields get mapped as java.math.BigDecimal.
    which according to the Oracle JDBC specification is how they are mapped.
    Problem:
    When I try to create a new database entity through my EJB entity bean I get:-
    Error "ORA-00932: inconsistent datatypes: expected NUMBER got BINARY".
    The value of the number being used as the primary key in this example is 10.
    Eg:-
    BigDecimal pk = new BigDecimal(10);
    TestBean test = home.create(pk);
    The datatype in my EJB Deployment descriptor ejb-jar-xml <pri-key-class> is java.math.BigDecimal>
    The jdbc driver defined in my application.xml is
    oracle.jdbc.driver.OracleDriverand url="jdbc:oracle:thin..." in the connection.
    I’ve even tried mapping a datatype as described in the Oracle FAQ’s but this didn’t work.
    21.     I'm trying to deploy a CMP entity bean with a field type BigDecimal and the table creation fails with an error. How do I work around this?
    You have to perform the following steps prior to deploy your application.
    o     Define the mapping for java.math.BigDecimal in the database-schemas/oracle.xml as follows:
    <type-mapping type="java.math.BigDecimal" name="number(20,8)" />o     Use this schema in your data-source as follows:-
    <data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    ejb-location="jdbc/OracleDS"
    schema="database-schemas/oracle.xml"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="scott"
    password="tiger"
    url="jdbc:oracle:thin:@localhost:1521:DEBU"
    clean-available-connections-threshold="30"
    rac-enabled="false"
    inactivity-timeout="30"
    />

    Further clarification of my problem.
    Originally I said the error occurred when deploying EJB's
    Correction: I can deploy them OK on the application server However the Error message occurs when I try to create a new EJB entity, the only value required is the Primary key which I pass as type BidDecimal.
    If I create entries directly in the database my EJB findByPrimaryKey can find entities OK.
    But I cant create new ones through EJB.
    What realy baffels me is why I'm able to read data through the connection but not write.
    The datatype in my EJB Deployment descriptor ejb-jar-xml <pri-key-class> is java.math.BigDecimal>
    The jdbc driver defined in my application.xml is
    oracle.jdbc.driver.OracleDriver
    and url="jdbc:oracle:thin..." in the connection.

  • Ora-00932 inconsistent data type expected date got number

    Hi all,
    I have got an error ora-00932 inconsistent data type expected date got number in the below part of query.
    NVL (TRUNC (wdj.date_completed), '14-NOV-2012')
    BETWEEN NVL (TRUNC(:p_wo_completion_date_from),
    NVL (TRUNC(wdj.date_completed), '14-NOV-2012')
    AND TRUNC(:p_wo_completion_date_to)
    can u please help me to resolve the error mentioned.
    Thanks in advance.
    Regards,
    Ravi

    NVL(TRUNC (wdj.date_completed),to_date('14-NOV-2012','dd-MON-yyyy'))
         BETWEEN
              NVL (
                    TRUNC(to_date(:p_wo_completion_date_from,'mm/dd/yyyy hh12:mi:ss am')),
                   NVL (TRUNC(to_date(wdj.date_completed,'mm/dd/yyyy hh12:mi:ss am')),
                              to_date('14-NOV-2012','dd-MON-yyyy'))
            AND TRUNC(to_date(:p_wo_completion_date_to,'mm/dd/yyyy hh12:mi:ss am'))

  • Inconsistent data types

    am unable to read a clob column; there is also a long column present. get message "inconsistent data types". how do i fix this, please? oracle 8i

    Thanks, Joel. Yes I'm calling a CLOB from a 9i db, and putting it into an 8i local db. I have a LONG on the 8i local db, and the sql requests the result with the getchunk method. I'm using oraole 8.1.7 and was running into problems. The oraole is now working correctly, just trying to correct the columns to match and work. A CLOB column has been included in the local 8i table, but when I run sql against the local CLOB column, I get the inconsistent data error. Is it because there is also a LONG field in the table? How can I correct the CLOB local column so I don't get the sql error locally?
    Also, once we upgrade to 9i locally, will it not matter if a remote CLOB calls a local LONG?

  • "Schema validation found non-data type errors" error when passing a string value to date field in infopath

    Hi,
    I have an infopath web brower enabled form. In the form i have a date field.
    I am passing the data from the database to that field using the C# code.
    But, as the field from database is coming as string, i am getting an error, and i am not able to assign the value.
    I get the date value from database as "3/25/2011 12:00:00 AM"
    I used the below code:
    [CODE]
    if (objInfopathFormcData.myRecievedDate != null)
      myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager).SetValue(objInfopathFormcData.myRecievedDate);
    [/CODE]
    I am getting the error as "Schema validation found non-data type errors".
    How to set the value for a date field in Infopath.
    Thank you

    HI,
    I fixed it:
    Below code is used to fix:
    [CODE]
    XPathNavigator xfield = null;
    DateTime dtmyRecievedDate;
    dtmyRecievedDate = Convert.ToDateTime(objInfopathFormcData.myRecievedDate);
    if (objFormcData.FcCompletionDate != null)
    xfield = myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager);
    DeleteNil(xfield);
    xfield.SetValue(dtmyRecievedDate.GetDateTimeFormats().GetValue(5).ToString());
    // method to delete xsi:nil
    private void DeleteNil(XPathNavigator nav1)
    if (nav1.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
       nav1.DeleteSelf();
    [/CODE]
    Thank you

  • The return of the "Unexpected Data Type" error

    I've searched the forum and only found discussions of this from over a year ago, so either I'm a loner or this is rearing its ugly head again.
    I've got a project that I've been working on between two machines, both running AE 11.0.2.11 with the same plug-ins. One is a macbook pro, one is a macpro. Both are running 10.6.8 (I believe that's snow leopard). I've been saving the project files and assets to the dropbox folder on my machines so that everything is always in sync between them. ***It's been working flawlessly for months.*** I haven't updated anything recently, other than installing Adobe Acrobat on the desktop machine a few days ago.
    This morning on my desktop machine, I couldn't get the project to open without getting the "unexpected data type" error. Holding down shift did nothing. I instinctively started a new project and imported the .aep I was trying to open. No errors! Then I tried to change work spaces and the error came up again. I hit caps lock and tried again. No go. At one point the workspace drop-down had bullets next to *two* of the workspaces, as if they were both active simultaneously.
    My workaround for the moment was to go to my dropbox on the website and revert to a previously saved version of the same project (thank *YOU* dropbox) from a few days ago. That opened fine, though it's missing a few hours' work.
    My fear is that this will recur and I will have to keep going back in time to keep working (two steps forward, one step back) and I've got a deadline to meet. I will try to stay away from custom workspaces, as one poster to this forum says they are generating that error in CS6 (no helpful replies to that thread).
    Anyone else experiencing this in 2013? Any ideas? All help is much appreciated.
    AE CS6 11.0.2.11
    Mac Pro OS v 10.6.8
    Processor:  2x 2.66ghz dual core intel xeon
    12Gb 667mhz DDR2 RAM

    I just started getting the same error today. Never would've imagined workspaces would have ANYTHING to do with this. But I just went to workspaces and clicked 'reset workspace' for whatever I was on, reloaded the project and no error. WTF Adobe??

  • Error in Primavera Analytics 3.1 (staretl issuing long data type error)

    Hi,
    While running ETL for Primavera Analytics 3.1 I am facing long data type error.
    Detailed session log can be found on below URL.
    http://pastebin.com/Ez0VihGN
    I have following environment.
    Primavera Analytics on Win2k8 64bit with 11g R2 DB.
    Primavera EPPM DB on Sql Server
    Connectivity through Oracle Gateway. (tested)
    Please help.
    Naeem Akhtar
    Edited by: Naeem Akhtar Khan on Apr 9, 2013 3:58 AM

    Based on your post there is an error in you initdg4msl.ora file............ make sure you the database connection is correct and you add the two statement to the file
    for example
    Should be: HS_FDS_CONNECT_INFO=YOURSQLSERVER//YOUR DATABASE
    Make sure you to add the following to the same file (see page 92):
    HS_NLS_LENGTH_SEMANTICS=CHAR
    HS_FDS_CHARACTER_SEMANTICS = TRUE
    HS_KEEP_REMOTE_COLUMN_SIZE=ALL
    Rerun the ETL process

  • InfoPath - "Schema validation found non-data type errors." at XmlWriter.Close()

    Greetings, 
    I'm creating a form that allows for emailing attachments however I am having an issue. When I try to attach a file, I get an "Schema validation found non-data type errors." error message. It seems like it's something with the XML structure and
    I cannot find anything wrong. 
    Here is the code:
    string myNamespace = NamespaceManager.LookupNamespace("my");
    using (XmlWriter writer = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Email/my:AttachmentGroup", NamespaceManager).AppendChild())
    //Write to XML
    InfoPathAttachmentEncoder myEncoder = new InfoPathAttachmentEncoder(currentFile);
    writer.WriteStartElement("Attachments", myNamespace);
    writer.WriteElementString("attachment", myNamespace, myEncoder.ToBase64String());
    writer.WriteElementString("attachmentCheckbox", myNamespace, "false");
    writer.WriteEndElement();
    writer.Close();
    Here is the structure of the XML (root node is myFields):
    <my:Email>
    <my:AttachmentGroup>
    <my:Attachments>
    <my:attachment xsi:nil="true"></my:attachment>
    <my:attachmentCheckBox>false</my:attachmentCheckBox>
    </my:Attachments>
    </my:AttachmentGroup>
    <my:emailAddress>[email protected]</my:emailAddress>
    <my:subject>Paychex ESR Services Paperwork</my:subject>
    <my:body/>
    <my:selectAll>false</my:selectAll>
    </my:Email>
    Attachments is the repeating group in this case.
    Can anyone spot where the error is coming from?
    Thanks!

    HI,
    I fixed it:
    Below code is used to fix:
    [CODE]
    XPathNavigator xfield = null;
    DateTime dtmyRecievedDate;
    dtmyRecievedDate = Convert.ToDateTime(objInfopathFormcData.myRecievedDate);
    if (objFormcData.FcCompletionDate != null)
    xfield = myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager);
    DeleteNil(xfield);
    xfield.SetValue(dtmyRecievedDate.GetDateTimeFormats().GetValue(5).ToString());
    // method to delete xsi:nil
    private void DeleteNil(XPathNavigator nav1)
    if (nav1.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
       nav1.DeleteSelf();
    [/CODE]
    Thank you

  • Oracle/java timestamp data type error.. please help

    Im having trouble with a SQL query of mine. Im trying to get a timestamp using JDBC from an oracle database however i get the following error:
    java.sql.SQLException: ORA-00932: inconsistent datatypes: expected %s got %s
    Now when i put the java.util.timestamp into the DB it appears to change.
    When I printout the value of the timestamp in my console it prints the following:
    07-06-26 17:28:09.414
    When i check the value from SQL PLUS it gives me this value
    07-06-26 17:28:09,000000
    Does anyone have any idea why this happens? and more importantly how I can retrieve the timestamp again.
    Im using BEA workshop which means i dont have any means of manipulating the data before presenting to the frontend.
    The database is Oracle 9.2.0.1

    user582245,
    Please provide the following:
    1. Entire error message and stack trace you are getting.
    2. Part of your code where the error occurs.
    3. JDK version you are using.
    4. Oracle data-type of the problematic column.
    Good Luck,
    Avi.

  • Conversion data type error at universe level

    Hi Friends,
    I am trying to convert a object datatype from number to char by using cast function in Universe Designer. I am getting bellow error. Help me on this.
    Thanks
    Riaz

    Hi,
    Try changing the data type of the object at business layer by selecting the related object instead of changing the data type at data foundation layer.
    Hope it helps.
    Grtz
    -Anila.

  • Getting Incorrect data type error while trying to do a CAST in table

    Getting an error while trying to compile the following piece of code
    CREATE OR REPLACE PACKAGE BODY A_pkg AS
    FUNCTION A(O_error_message IN OUT varchar2)
    RETURN BOOLEAN IS
    --Declaring the local variables and CURSORs used in the program unit
    L_attrib_tbl CFA_SQL.TYP_attrib_tbl;
    cursor c1 is
    select list_first1.number_11
    from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
    BEGIN
    L_group_id = '22'
    IF L_merch_type_value = 'G' OR L_merch_type_value = 'I' THEN
    CFA_SQL.QUERY_ATTRIB(L_attrib_tbl,
    L_group_id) ;
    END IF;
    open C1;
    Fetch C1 into L_number;
    close C1;
    return true;
    END A;
    END;
    Also pasting the Spec for CFA_SQL which contains TYP_attrib_tbl
    TYPE TYP_attrib_rec IS RECORD
    group_id CFA_ATTRIB_GROUP.GROUP_ID%TYPE,
    varchar2_1 VARCHAR2,
    number_11 number(10,0));
    TYPE TYP_attrib_tbl is TABLE of TYP_attrib_rec INDEX BY BINARY_INTEGER;
    The error is coming in the line
    cursor c1 is
    select list_first1.number_11
    from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
    with the error as Invalid data type pointing to CFA_SQL.TYP_attrib_tbl as invalid, but I have initialized L_attrib_tbl as of that datatype only. Ahy help would be greatly appreciated.
    Regards,
    Joydeep

    Hi Kelly,
    There is no data that is entered in that period.The data will be entered for that period next month.
    POV is also not set to that period,but still the problem persists.
    Thanks

  • Query Parameter Data Type error betwee IE6 and IE7

    Hello all.
    This is a strange one. Using MII v12. When setting parameters for a SQL query from Javascript, the query executes properly on IE7 but generates errors on IE6. The errors are JDBC errors having to do with "Conversion failed when converting datetime from character string." and "Error converting data type varchar to numeric." I don't get any browser errors, only Java errors and NetWeaver log entries.
    What is the source of this data typing error?

    Hi, Sparks.
    Actually, IE was always an anomaly when it came to proper typing of objects in Javascript, so it let you get away with things that really shouldn't work.
    In general, you should use the Number Javascript type for number properties (e.g. setRowCount(), setXAxisMinRange(), etc) and strings for just about everything else.  If I recall, Javascript will handle most of the type conversions to a String property, but not necessarily to a Number property.
    You can use the parseInt() and parseFloat() methods to convert from strings to numbers in Javascript.
    In general, it's a good practice to be "type aware" in your Javascript code anyway, and this will ensure that it runs in other browsers and future browsers.
    Rick

  • 'Value too large for defined data type' error while running flexanlg

    While trying to run flexanlg to analyze my access log file I have received the following error:
    Could not open specified log file 'access': Value too large for defined data type
    The command I was running is
    ${iPLANET_HOME}/extras/flexanlg/flexanlg -F -x -n "Web Server" -i ${TMP_WEB_FILE} -o ${OUT_WEB_FILE} -c hnrfeuok -t s5m5h5 -l h30c+5 -p ctl
    Which should generate a html report of the web statistics
    The file has approx 7 Million entries and is 2.3G in size
    Ideas?

    I've concatenated several files together from my web servers as I wanted a single report, several reports based on individual web servers is no use.
    I'm running iWS 6.1 SP6 on Solaris 10, on a zoned T2000
    SunOS 10 Generic_118833-23 sun4v sparc SUNW,Sun-Fire-T200
    Cheers
    Chris

Maybe you are looking for