ORACLE Parameter Data Types

Hi,
We are using for all Oracle number columns the Oracle parameter type OracleType.Number.
Now we have seen that we can also use the type OracleTyp.Int32.
Is it better or faster to use this type for columns
which can use this type.
Have anybody experience with using Oracle data types ??
Kind Regards
Martin

It really depends on what kind of data you're inserting or updating. If you've data that can be accomodated in an integer, you should use OracleDbType.Int32 over OracleDbType.Decimal. You get much better performance by using Byte, Int16, Int32, Single, Double over Decimal but these types can not hold the same precision and scale as Decimal type can.

Similar Messages

  • ADF View Object query to use Oracle  LONG data type

    Hi,
    I'm using a view object that uses Oracle LONG data type.The following exception is thrown
    *"java.sql.SQLException: Stream has already been closed"* and it is not fetching the correct data.
    I have searched in many forums,they suggested to use LOB instead of LONG as LONG is deprecated. But in my case I can't avoid using LONG as some of my legacy applications using the same DB.
    Please suggest me a way
    Thanks in Advance
    Felix

    Thanks for your reply Arun,
    I have solved this problem using the solution suggested by this blog [AskTom-Link|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:839298816582]
    In the above blog link,they have suggested to convert Long to Varchar by functions and asked to use this function in the column.
    Thank you all guys who have seen this post.
    Regards,
    Felix

  • How could Ecatt support a FM which has export parameter data type as any

    Hi,
    I have created a FM which has export parameter data type as 'Type ref to data'.
    The actual paremeter value for this export parameter is a dynamically generated internal table, which does not have a abap dictionary data type.
    Could I use the 'FUN' ecatt command to test this FM?  How could I get this reference export parameter?
    Thanks a lot in advance!

    Hi,
    Wouldn't it be enough if you define parameter in test data container as reference to table type with structure of type c(1000)  (or more/less characters depending on how much data you need to pass)?
    I'm not 100% sure if filling this table with data will work (this is reference after all) but if this is an issue than create 2 parameters: 1 of table type and second of reference type. Then inside your script before FUN use ABAP...ENDABAP to assign your table parameter to reference parameter and use second one as input for FUN command.
    I think that either first or second solution should work.
    Best regards
    Marcin Cholewczuk

  • Problem loading PostgreSQL Bytea data type to Oracle Raw data type

    We are migrating our database from PostgreSQL to Oracle. First, we convert the BYTEA data type in PostgreSQL to Oracle RAW. The BYTEA data type is variable bytes array. How can we load the BYTEA data type to Oracle RAW data type? Or I have to convert to different data type. thanks.
    Peter,

    hi,
    Instead of 'interval day to second' in method declaration use internal datatype 'DSINTERVAL_UNCONSTRAINED'.
    There are more unconstrained types in oracle.
    Bartek

  • Oracle-specific data types vs Connection pool

    Hi, using Oracle-specific data types such as
    ArrayDescriptor and create it by a connection to an Oracle database from a WebSphere datasource throw a ClassCastException. There is no problem using these Oracle-specific data types when the connection is obtained via the DriverManager. WebSphere cannot fix the problem because these data types are
    not part of the JDBC specification.
    Some reply from Oracle?
    Thank you very much.

    Thank you but I there is no solution in that thread.
    Also, I know that WebLogic from BEA has a way around this issue... No Websphere work around ?
    No Oracle fixing ?
    Thanks.

  • How could I Write data into a field in Oracle whose data type is VARCHAR2

    The target data I want to write into Oracle is in http://tw.yahoo.com/info/utos.html.
    Now, these data is stored in Mysql database and the field which stores these data uses "Text" as its data type.
    I want to derive these data from mysql database and store them into a field of oracle database.
    In oracle, I create field whose data type is varchar2(4000) to store these data.
    I use JSP to derive data from mysql and insert into oracle through JDBC.
    But the result of the page shows me that "javax.servlet.ServletException: Data size bigger than max size for this type: 25623".
    Please anyone could help to resolve this problem?
    Thank you very much.

    My hunch is that the problem is that VARCHAR2(4000), but default, allocates 4000 bytes of storage. Depending on your database character set, a single character may require up to 4 bytes of storage.
    If you are on 9i, you can declare the column VARCHAR2(4000 CHAR) to allocate 4000 characters of storage. You can also set NLS_LENGTH_SEMANTICS to CHAR, which will cause Oracle to assume that your declarations are in characters rather than bytes.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to avoid oracle implicit data type conversion

    Hello,
    i have a query like below..
    SELECT EMP_NUM
    FROM EMPLOYEE
    WHERE EMP_NUM=SOURCE_EMP_NUM;
    1. My SOURCE_EMP_NUM data type is varchar2.
    2. My table EMP_NUM data type is number.
    3. In one case my SOURCE_EMP_NUM value '00000123'
    4. I have an entry in table for EMP_NUM as 123.
    5. In this case my query is success and giving me row for 123, which i don't want it should compare with leading zeros. But due to oracle implicit conversion the comparision getting passed.
    6. I have an index for this column, so i can't use "like" operator...
    Can somebody help me.....
    Thanks in adv....

    HI,
    Just see this :---
    SQL> select * from emp where deptno=00020;---------deptno is number, 00020 is number and its true
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800 20
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7788 SCOTT ANALYST 7566 19-APR-87 3000 20
    7876 ADAMS CLERK 7788 23-MAY-87 1100 20
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    SQL> select * from emp where to_char(deptno)=00020;=-------------deptno is character type and 00020 is number so still it is leaving 0000 from 20 as it number and has no impact,
    EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
    7369 SMITH CLERK 7902 17-DEC-80 800 20
    7566 JONES MANAGER 7839 02-APR-81 2975 20
    7788 SCOTT ANALYST 7566 19-APR-87 3000 20
    7876 ADAMS CLERK 7788 23-MAY-87 1100 20
    7902 FORD ANALYST 7566 03-DEC-81 3000 20
    SQL> select * from emp where to_char(deptno)='00020';---now both are character and no row is selected.
    no rows selected
    So you can avoid the implicit conversion according to the requirements and in this case we are usin to_char function to avoid this.
    Regards,
    Navneet

  • Oracle Object Data Type and EJB

    Hi, All:
    Has anyone implemented a project with Oracle user-defined data type (Object
    Data Type) together
    with EJB? That is, using ORDBMS (Object Relational Database) together with
    EJB. I am thinking to use ORDBMS together with EJB. Any information, samples
    and references to this direction is appreciated.
    Thanks,
    John Wen
    RM2M, LLC
    [email protected]

    I''ve got a solution! I've had sql in my query
    SELECT
      ltrim(OPERATIVE_REPORT."orderText",11),
      OPERATIVE_REPORT."resolID",
      COUNT(OPERATIVE_REPORT."(usrID)order_executionUser")
    FROM
      OPERATIVE_REPORT
    GROUP BY
      ltrim(OPERATIVE_REPORT."orderText",11),
      OPERATIVE_REPORT."resolID"
    where orderText has clob datatype. And the reason is GROUP BY. GROUP BY deny CLOB usage.

  • 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

  • Oracle apps data type number came over to disco as varchar

    created custom foler ( fnd_flex_values_vl) using sql, one of DFF item ( original data type is number) shows as varchar. Anybody knows how to convert this to number , I tried to_number but still shows as text in Desktop.

    Sorry, thought you'd said it was a function originally.
    Okay, so as a custom folder, is it possible that there are NULLs being encountered in the attribute1 field?
    ie:
    select flex_value_set_id, flex_value_id,flex_value, description,
    to_char(attribute1,'999,999,999') budget,to_number(attribute1,'999,999.99') Budget_amount_number
    from fnd_flex_values_vl
    where flex_value_set_id='1004012'
    becomes:
    select flex_value_set_id, flex_value_id,flex_value, description,
    to_char(NVL(attribute1,'0'),'999,999,999') budget,to_number(NVL(attribute1,'0'),'999,999.99') Budget_amount_number
    from fnd_flex_values_vl
    where flex_value_set_id='1004012'
    or is it something more difficult?
    Russ

  • Oracle Long Data type Problem

    Hi,
    I am using ORACLE 7.3.4 database. I am having a problem in updating a column of long datatype in a table t1 with another column from table t2 of long datatype. I have tried setting LONG 1000000 also but this doesn't work. I appreciate any kind of suggestions.
    The error it gives is ORA-00997: illegal use of LONG datatype.
    Thanks
    Reddy

    I had the same problem too with a newest thin driver. I found that I can read all my characters (bytes) using getBinaryStream() and single-byte read(), but read() never returns -1; instead reading the character before last causes the ArrayOutOfBoundsException you mentioned.
    So I just blindly caught the exception and let it go to QA. (sort of
    InputStream r = rs.getBinaryStream(field);
    if(r == null) ...
    StringBuffer sb = new StringBuffer();
    try { for(int c = -1;  (c = r.read()) != -1;)  sb.append((char) c); }
    catch(IndexOutOfBoundsException e)
    {} // ignore Oracle idiosyncrazy.
    finally { r.close(); }
    ). Please note that getCharacterStream() or getAsciiStream() did not work for me. I did not try deprecated getUnicodeStream(): I decided I would better correctly extract characters in Java from binary data myself if I need them rather than allowing this junky thin Oracle driver to do an extra thing for me.

  • Can't update oracle Long data type

    Hi All,
    Setup
    Weblogic 5.1.0sp11, oracle 8.1.6, Solaris8, classes12.zip,
    Solaris_JDK_1.2.1_03a
    ConnectionPool:
    weblogic.jdbc.connectionPool.XXXDBPool=\
    url=jdbc:oracle:thin:@10.2.30.50:1521:ZZZZ,\
    driver=oracle.jdbc.driver.OracleDriver,\...etc
    Problem
    I can't seem to write to (insert/update) an oracle type Long column
    using connections from the weblogic connection pool. Each entry(as
    XML) into this column is fairly large (>1MB). Reading from works fine,
    however.
    The same configuration(minus connection pool and associated
    code/config) via tomcat works fine(read/write), so I'm thinking the
    weblogic connection pool is giving me a connection object which
    doesn't update this Long column properly.
    Using the usual(again works fine for tomcat) :-
    //Url = jdbc:weblogic:pool:XXXDBPool
    //driver = weblogic.jdbc.pool.Driver
    stat = con.prepareStatement("UPDATE BM_RM_USER_DIARY set DIARY=? where
    id=?");
    //stat.setString(1,diaryData); //use an inputstream instead.
    ByteArrayInputStream bais = new
    ByteArrayInputStream(diaryData.getBytes());
    //StringBufferInputStream bais = new
    StringBufferInputStream(diaryData); //deprecated
    stat.setAsciiStream(1, bais, bais.available());
    stat.setLong(2,userId);
    I'm not getting any errors from this update, so I can't really see
    what I might be doing wrong. It just returns fine as if it has
    succeeded (rows updated = 1)
    Assuming I CAN NOT change these settings, are there any other ways I
    can programmatically get these inserts working ? Is this even a known
    issue ? as i can't find a problem in these postings that quite matches
    mine.
    Any help appreciated.
    Cheers
    Alkesh

    Hi All
    Just to follow up on this.
    The problem was solved by explicitly calling commit() after
    the update has taken place.
    It seems as though my connection from the connection pool has
    autocommit set to false.
    Thanks
    Alkesh
    [email protected] (Alkesh) wrote in message news:<[email protected]>...
    Hi All,
    Setup
    Weblogic 5.1.0sp11, oracle 8.1.6, Solaris8, classes12.zip,
    Solaris_JDK_1.2.1_03a
    ConnectionPool:
    weblogic.jdbc.connectionPool.XXXDBPool=\
    url=jdbc:oracle:thin:@10.2.30.50:1521:ZZZZ,\
    driver=oracle.jdbc.driver.OracleDriver,\...etc
    Problem
    I can't seem to write to (insert/update) an oracle type Long column
    using connections from the weblogic connection pool. Each entry(as
    XML) into this column is fairly large (>1MB). Reading from works fine,
    however.
    The same configuration(minus connection pool and associated
    code/config) via tomcat works fine(read/write), so I'm thinking the
    weblogic connection pool is giving me a connection object which
    doesn't update this Long column properly.
    Using the usual(again works fine for tomcat) :-
    //Url = jdbc:weblogic:pool:XXXDBPool
    //driver = weblogic.jdbc.pool.Driver
    stat = con.prepareStatement("UPDATE BM_RM_USER_DIARY set DIARY=? where
    id=?");
    //stat.setString(1,diaryData); //use an inputstream instead.
    ByteArrayInputStream bais = new
    ByteArrayInputStream(diaryData.getBytes());
    //StringBufferInputStream bais = new
    StringBufferInputStream(diaryData); //deprecated
    stat.setAsciiStream(1, bais, bais.available());
    stat.setLong(2,userId);
    I'm not getting any errors from this update, so I can't really see
    what I might be doing wrong. It just returns fine as if it has
    succeeded (rows updated = 1)
    Assuming I CAN NOT change these settings, are there any other ways I
    can programmatically get these inserts working ? Is this even a known
    issue ? as i can't find a problem in these postings that quite matches
    mine.
    Any help appreciated.
    Cheers
    Alkesh

  • ORACLE CLOB data type and WIS 10901

    Hello! I have several objects in universe that has connection to ORACLE DB. One of them has type CLOB in db and Long Text in universe, other has type number and has definition COUNT(db_column).
    When I'm using this objects separate in webi query - everything fine, but when I put them together I've got error message:
    A database error occured. The database error text is: ORA-00932: inconsistent datatypes: expected - , got CLOB
    . (WIS 10901)
    What's going wrong?

    I''ve got a solution! I've had sql in my query
    SELECT
      ltrim(OPERATIVE_REPORT."orderText",11),
      OPERATIVE_REPORT."resolID",
      COUNT(OPERATIVE_REPORT."(usrID)order_executionUser")
    FROM
      OPERATIVE_REPORT
    GROUP BY
      ltrim(OPERATIVE_REPORT."orderText",11),
      OPERATIVE_REPORT."resolID"
    where orderText has clob datatype. And the reason is GROUP BY. GROUP BY deny CLOB usage.

  • Oracle XMLtype data type

    Latest Powerbuilder 12.5.2
    Oracle 11g
    How can I update a XMLType column?
    can select it, but errors on update.

    Sorry about that, I got the information from this link:
    XMLType Operations
    I guess we need to get the right syntax in sqlplus (or equivalent) then map that to PB.
    The other alternative is to create a procedure to do the update for you, pass in a clob and convert that. The 4k limit you are seeing is the limit on a varchar2. All the xml work I have done has involved endless conversions.
    CREATE OR REPLACE PROCEDURE xmlupdate (xmlin IN CLOB, xmlout OUT CLOB)
    IS
       txml           XMLTYPE;
    BEGIN
    -- Convert Clob Received into an XML document
       txml := xmltype (xmlin);
    END;

  • Oracle -  Implict Data type converison behaviour?

    Hi All,
    In my Project, there are many queries have join conditions between Number column and Varhchar2 column. Will it give any wrong results or Invalid Number exception, even if the varchar2 column always contains the number data?
    Example:
    Select * from Table_t1 t1, table_t2 t2
    where t1.num_col = t2.var_col
    -- Here var_col always hold only numaric data.
    Thanks

    You should not depend on the implicit datatype conversion. If you allow implicit conversion then it means you donot have the control over your program. Also, it might ignore the use of Index in query. Explicit conversion not only increase the readability but also make your code clear to understand.

Maybe you are looking for

  • System Problems....What should I do?

    I took my Mac Book in a couple of months ago to have it restored back to factory settings. I also upgraded my system to Mac OS X Mountain Lion. My Macintosh HD shows 216 GB available with a capacity of 248.68 GB. However when I go under the hardware

  • ExecuteOutOfProcess Flag causes Execution Error

    Hello guys, I have a problem with calling other Packages from my SSIS 2012 Package "Main.dtsx". I have an "Execute Package Task" in Main which calls "MyPackage.dtsx". If the ExecuteOutOfProcess Flag is set to "False" everything works fine. When I swi

  • Ristrict the payments in F110

    Hi Experts, As per my client requirement, If i run the F110 by taking posting upto date in the parameters screen as today i.e.08/12/2011. And i run the proposal and i will got the open items which are due upto now. But as per my client in this list p

  • Hard drive interface 6 Gb/s

    Just posting my experience for others not to get caught in problems as I did recently. Bought a Western Digital 6 Gb/s one terabyte 64 meg cache 7200 rpm sata hard drive. I installed it in a 2008 Mac Pro to run Snow Leopard. My one thought was it sho

  • Webmail stopped working

    Hi! I just had some trouble with my mail-services this week, but these are fixed now, thanks to pterobyte. Yesterday one person wanted to activate his holiday auto-responder, I realized that webmail stopped working. I had a look at ServerAdmin, but t