Column Type Conversion

Hi All,
I have an ERP which is being upgraded to a newer version along with the backend Oracle database from 8i to 10g. The old version has so many tables with CHAR type columns and the vendor is overcharging (yeah..its normal) us for the conversion. Is there a method which I can try to get the tables scanned one by one and then converted to VARCHAR2 and then the data inserted with ALLTRIM or a similar method. I am looking at a solution that can give me the least amount of downtime and faster results.
Thank you,
JeeKay
Message was edited by:
user577864
Message was edited by:
user577864

Hi,
You may want to try this:
SQL> set pages 0
SQL> spool c:\windows\temp\modichar.sql
Started spooling to c:\windows\temp\modichar.sql
SQL> select 'alter table "' || t.OWNER || '"."' || t.TABLE_NAME || '" modify "' || t.COLUMN_NAME || '" VARCHAR2(' || t.DATA_LENGTH || ');'
  2  from dba_tab_columns t inner join dba_tables dt on t.owner = dt.owner and t.TABLE_NAME = dt.table_name
  3  where t.DATA_TYPE = 'CHAR' and t.owner IN ('TEST');
alter table "TEST"."ZTEST" modify "STRI" VARCHAR2(10);
SQL> spool off
Stopped spooling to c:\windows\temp\modichar.sql
SQL> @c:\windows\temp\modichar.sql
SQL> alter table "TEST"."ZTEST" modify "STRI" VARCHAR2(10);
Table alteredSimilar idea can be used to eliminate trailing spaces.

Similar Messages

  • Column Type Conversion Script

    Hi All,
    I would like to be able to perform a Column Datatype conversion on a database. I want to find all tables for a schema that has a CHAR type column and then convert it into VARCHAR2 of the same length and MODIFY existing data with a TRIM function to reclaim space.
    The information necessary about any column in a table is DBA_TAB_COLUMNS and I should be able to loop this till the last table.Any suggestions or feedback will be helpful.
    Thank you,
    JeeKay

    Native Dynamic SQL
    http://www.psoug.org/reference/nds.html
    or
    DBMS_SQL
    http://www.psoug.org/reference/dbms_sql.html
    Either one will do it.
    One of my examples shows synonym creation. With a modification of the DDL it will do what you want.

  • Conversion away from column type may result in sub-optimal query plan

    Hello all,
    I have the following select statement in a cursor compiled in a package.
    SELECT id
    FROM table
    WHERE TRUNC(ts) >= TRUNC(SYSDATE - p_days)
    However I get 4 warnings that read:
    PLW-07204: conversion away from column type may result in sub-optimal query plan
    Does anyone know of a way to rewrite the query to avoid the compilation warnings?
    I'm just trying to compare the date without the time...
    Thanks in advance
    Dan

    For what it is worth, whenever you compare a date column to either sysdate or any built-in function returning a date you will get that warning.
    SQL> desc t
    Name                                      Null?    Type
    ID                                                 NUMBER
    DT                                                 DATE
    SQL> SELECT DUMP(dt), DUMP(trunc(dt)), dump(sysdate)
      2  FROM t;
    DUMP(DT)                            DUMP(TRUNC(DT))                  DUMP(SYSDATE)
    Typ=12 Len=7: 120,107,7,12,15,16,43 Typ=13 Len=8: 7,215,7,12,0,0,0,0 Typ=13 Len=8: 7,215,7,12,14,16,11,0But,
    SQL> CREATE FUNCTION f(p_v IN VARCHAR2) RETURN DATE AS
      2  BEGIN
      3     RETURN TO_DATE(p_v, 'dd-mon-yyyy');
      4  END;
      5  /
    Function created.
    SQL> SELECT DUMP(f('01-jan-2000')) FROM dual;
    DUMP(F('01-JAN-2000'))
    Typ=12 Len=7: 120,100,1,1,1,1,1John

  • PLW-07204: conversion away from column type may result in sub-optimal query

    I have the following query in the package that created using sql developer. I am receiving the error 'PLW-07204: conversion away from column type may result in sub-optimal query plan' when try to compile the package. The issue is happen to be in the last line where the date is. Any help? Thanks
    select count(*) into n_cnt
    from tmp_order
    where sgn_off_dt is null and cmt_dt is not null
    and sysdate - cmt_dt > 90;

    Sy:
    Try doing as a procedure instead of an anonymous block. It looks like warnings do not apply to blocks.
    SQL> create table tmp_order(sgn_off_dt date,cmt_dt date);
    Table created.
    SQL> alter session set plsql_warnings='ENABLE:ALL';
    Session altered.
    SQL> create procedure p as
      2     n_cnt number;
      3  begin
      4     select count(*) into n_cnt
      5     from tmp_order
      6     where sgn_off_dt is null and
      7           cmt_dt is not null and
      8           sysdate - cmt_dt > 90;
      9  end;
    10  /
    SP2-0804: Procedure created with compilation warnings
    SQL> show err
    Errors for PROCEDURE P:
    LINE/COL ERROR
    8/18     PLW-07204: conversion away from column type may result in
             sub-optimal query planlindalop:
    In this case, you can ignore the warning, as it is not correct. Sysdate and a date column have different internal data types (note the type 13 for sysdate and type 12 for the date column), and whatever internally generates the warnings seems to just compare the type number.
    SQL> insert into tmp_order values(sysdate, sysdate);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select dump(sysdate) sdate, dump(cmt_dt) cmt_dt from tmp_order;
    SDATE                             CMT_DT
    Typ=13 Len=8: 7,219,2,3,15,44,4,0 Typ=12 Len=7: 120,111,2,3,16,44,12However, Oracle is perfectly capable of using an index on a date column with sysdate as a predicate. I would agree with Sy's suggestion to re-work the predicate to be something like cmt_dt < sysdate - 90.
    John

  • PLW-07202: bind type would result in conversion away from column type

    Got this error, "PLW-07202: bind type would result in conversion away from column type", when compiling in the stored procedure editor.
    CREATE OR REPLACE
    procedure test_proc (at_incoming varchar)
    as begin
    insert into test2(itemname) values (substr('1234',1,2));
    end;
    The table test2 was created like this:
    CREATE TABLE "DMSCO"."TEST2"
    (     "ITEMNAME" VARCHAR2(30),
         "ITEM2" VARCHAR2(10),
         "ITEMNUM" NUMBER(10,0)
    Removed the substr, and it compiles.
    CREATE OR REPLACE
    procedure test_proc (at_incoming varchar)
    as begin
    insert into test2(itemname) values ('1234');
    end;
    In sqlplus it compiles fine even with the substr.

    PLW-07202: is a warning. There's a bug that it's showing as an error.
    -kris

  • Choice of database column types, part 2: float(53) (or BINARY_DOUBLE) versu

    Original post in this series:
    http://forum.java.sun.com/thread.jspa?threadID=629958
    Issue #2: float(53) (or BINARY_DOUBLE) vs float(126)
    The original database design uses float(126) for several floating point type columns. Conversation with one of the database guys involved reveals that this was not a particularly conscious choice, but came when migrating an earlier database which simply used float as the column type.
    From my perspective as a Java programmer who needs to work with this data via JDBC, the choice of float(126) as a type is poor as it (a) is probably overkill, storing unneeded precision and thus wasting space (b) is unrepresentable as a Java double type unless truncation error is introduced (c) might be the cause of subtle bugs.
    Point (a) needs no further explanation.
    For point (b), note that oracle's float(53), not float(126), is the float type that best corresponds with Java's (IEEE 754) double type.
    Unfortunately, float(53) is NOT exactly equivalent to Java's double: Oracle internally uses binary coded decimal to represent numbers (float is essentially an oracle number type with added restrictions), which will not be the same bits as Java's double format (for a reference, see http://builder.com.com/5100-6388-5224536.html). This means that there can be conversion and rounding issues even when you use float(53) (see http://www.stanford.edu/dept/itss/docs/oracle/9i/java.920/a96654/oraint.htm#1000888 which states "Performing mathematical manipulations of the data directly in SQL format avoids the loss of precision that occurs in converting between SQL and Java formats").
    For point (c), here is an example of how I think that subtle bugs can be introduced. Suppose that you do a query and among the results is some floating point type, internally stored in the db as float(126) but which can only be represented in a normal computer language program by a double type, which is equivalent to a float(53). (No one wants to use a class like Java's BigDecimal if at all possible because it is very awkward to use and is extremely slow as well.) So truncation has to occur. Then suppose that the programmer wishes to use that floating point value, unmodified, as part of a subsequent query, say in an equals condition. But now it may not equal because the value in his program has lost information present in the original, so the query does not work as expected. Of course, for this scenario, one could query based on "approximately equal" instead of exactly equal. But that assumes that the programmer knows to do this, and then even if he does, it is a pain to write, may be a performance hit, and subjectivity is involved (e.g. in how much being off you will tolerate). So, if it is at all possible to reasonably avoid this, yuo want to.
    It appears that Oracle 10g now offers the BINARY_DOUBLE type which DOES exactly correspond to Java's double type; see http://builder.com.com/5100-6388-5224536.html
    What are people's thoughts on the points that I raise above: is using a float(126) a suboptimal design choice, or are there no significant issues?
    Anyone have experience with the new BINARY_DOUBLE type? (Unfortunately, we are currently using Oracle 9i so this may not be an option for us.)

    Original post in this series:
    http://forum.java.sun.com/thread.jspa?threadID=629958
    You could have posted it as a reply to that post. :)
    It's difficult managing to keep multiple posts close together.

  • Check Column Type in Calculation View

    Hi All,
    Before coming to actual problem, let me tell you a little background about the scenario.
    Tables are replicated using SLT from a Java based system (SAP MII) to HANA. The table (say TABLE_1) contains a column of type DATE.
    SLT be default converts the DATE type to NVARCHAR while replicating.Hence in HANA the column type is NVARCHAR.
    Now, in HANA I am converting this column to SAP_DATE format (YYYYMMDD) by using the formula
    leftstr(replace("COLUMN_NAME",'-',''),8)
    Problem:
    The MII (The source system) can also be on HANA. So there are 2 scenario possible.
    MII is using some other DB and it is connected to HANA using SLT.
    MII is itself is on HANA and no SLT is required.
    In scenario 2, since there are no SLT, the column type is DATE in HANA. Therefor the expression leftstr(replace("COLUMN_NAME",'-',''),8) gets failed.
    We need to check the data type of column and then change the expression dynamically. For example
    If (COLUMN-DATA-TYPE = DATE)
    convert to string and the apply the expression leftstr(replace("COLUMN_NAME",'-',''),8)
    Else If (COLUMN-DATA-TYPE = NVARCHAR)
    apply the expression leftstr(replace("COLUMN_NAME",'-',''),8)
    There are system tables/views which can be used to check column data type. But all there are Row-based. We can not use row-based table in calculation view.
    Also if we use them some additional privileges will be required for all end-users who need to check output of the views.
    Awaiting suggestion/ideas. Thanks.
    Regards,
    Raja

    Hi Raja,
    TO_DATS is not available as an expression for graphical calc view.
    It is a SQL function.
    Question is: what do you need the legacy format for?
    Why not use the date data type?
    The problem with using the non-date data types to handle date information is that the database cannot know that it is a date column.
    Validity checks don't work.
    '20141301' is completely fine with the database if it is stored as string - but not as a date.
    Cardinality estimations will be off.
    How many distinct values can be expected between '20140101' and  '20140201' ?
    The date data type "knows" there are only 30 further values possible.
    The string representation is open for at least a hundred values - if you just stick to the numeric digits.
    Also, when you use this column in your graphical calc view, the frontend UI won't know that it is supposed to be  date column.
    No fancy date picker widget will pop up.
    Finally, this is slowing down your model.
    The conversions need to be done over and over - what for?
    All in all, yes, I do see some problems with this approach...
    So, you really should consider to perform the conversion before you store the data.
    Details on how to configure SLT can be found in, you guessed it, the documentation!
    - Lars

  • Implicit and explicit Type conversion using Type object in heap

    Hi,
    I am surprised how Implicit and explicit Type conversion works using Type object in heap. for example when implicit type conversion occur what pointer it returns to object and similarly with explicit type conversion.

    Hello,
    >> I am surprised how Implicit and explicit Type conversion works using Type object in heap.
    For Implicit conversions: Typical examples are conversions from smaller to larger integral types, and conversions from derived classes to base classes. For the first one, the reference would be different which means it would return a different pointer to
    a new object. For the reference type, it actually points to the same memory location, you could use the object.ReferenceEquals() to check it.
    For Explicit conversions (casts):Typical examples include numeric conversion to a type that has less precision or a smaller range, and conversion of a base-class instance to a derived class. For first one, it would perform the same with implicit conversions.
    While for the conversion of conversion of a base-class instance to a derived class, actually, there's no built-in way to do this conversion.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Parameter causes invalid column type in custom iSetup API

    I have written a custom BC4J API that has 1 parameter. The extract operation for this API worked earlier with no parameter defined. Now I have defined 1 parameter, and specified 1 value for the parameter, and upon extraction, I get this error:
    Name: XXECSS_AZ_AKCUSTOMREGIONS
    Type: BC4J
    Path: oracle.apps.xxecss.isetup.server.AkCustomRegionsAM
    Time Taken(seconds): 1.0
    Logging parameter criteria xml
    <?xml version="1.0"?><parameters><conjunction>AND</conjunction><language></language><mode type="Import"> </mode> <mode type="Export"><param type="NameValuePair" seq="1" display="DisplayEnabled" editable="Editable"><operator>LIKE</operator><separator> </separator><name>CustomizationCode</name><value>1251058748512EGO_ITEM_RESULT_D</value><msgcode></msgcode><appcode></appcode><filtercode>CCFILTER</filtercode><datatype>java.lang.String</datatype><sqlforlov>SELECT DISTINCT CUSTOMIZATION_CODE CustomizationCode FROM AK.AK_CUSTOM_REGIONS</sqlforlov><sqlforlovcol></sqlforlovcol><param1>Customization Code</param1></param></mode> </parameters>
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT AkCustomRegionsEO.CREATED_BY,
    AkCustomRegionsEO.CREATION_DATE,
    AkCustomRegionsEO.CRITERIA_JOIN_CONDITION,
    AkCustomRegionsEO.CUSTOMIZATION_APPLICATION_ID,
    AkCustomRegionsEO.CUSTOMIZATION_CODE,
    AkCustomRegionsEO.LAST_UPDATED_BY,
    AkCustomRegionsEO.LAST_UPDATE_DATE,
    AkCustomRegionsEO.LAST_UPDATE_LOGIN,
    AkCustomRegionsEO.PROPERTY_NAME,
    AkCustomRegionsEO.PROPERTY_NUMBER_VALUE,
    AkCustomRegionsEO.PROPERTY_VARCHAR2_VALUE,
    AkCustomRegionsEO.REGION_APPLICATION_ID,
    AkCustomRegionsEO.REGION_CODE
    FROM AK.AK_CUSTOM_REGIONS AkCustomRegionsEO) QRSLT WHERE ((CUSTOMIZATION_CODE LIKE :1 ));
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
         at oracle.apps.az.fwk.server.BEExport.exportToXML(BEExport.java:525)
         at oracle.apps.az.fwk.server.BEApplicationModuleImpl.exportToXML(BEApplicationModuleImpl.java:403)
         at oracle.apps.az.r12.api.BC4JAPI.exportAPI(BC4JAPI.java:256)
         at oracle.apps.az.r12.extractor.cpserver.APIExtractor$APIExecuter.run(APIExtractor.java:635)
    ## Detail 0 ##
    java.sql.SQLException: Invalid column type
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:9231)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8812)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:9534)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:9560)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4511)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
         at oracle.apps.az.fwk.server.BEExport.exportToXML(BEExport.java:514)
         at oracle.apps.az.fwk.server.BEApplicationModuleImpl.exportToXML(BEApplicationModuleImpl.java:403)
         at oracle.apps.az.r12.api.BC4JAPI.exportAPI(BC4JAPI.java:256)
         at oracle.apps.az.r12.extractor.cpserver.APIExtractor$APIExecuter.run(APIExtractor.java:635)
    Status: ERROR
    The data type used is java.lang.String, and the value used is : 1251058748512EGO_ITEM_RESULT_D.
    using the query shown here, replacing the :1 bind variable with this value works fine. I'm wondering if I need to use a different data type, something more specifically supported by the iSetup Framework?

    Never Mind. I found the problem. It turns out it was that the VO's in the API were set to OracleNamed Binding, and it should be OraclePositional (Oracle) type binding.

  • Is there a way to Insert Data into a Lookup Column Type on a SharePoint List Destination in SSIS?

    Greetings.
    I have successfully worked out inserting SQL data (2008 R2) into my 2010 SharePoint list (New, Update, Delete) by creating an SSIS Data Flow Task as outlined here:
    http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html
    However, the problem I am running into is inserting data into the SharePoint Columns that are "Lookup" column types. I verified that all of the values I am copying from SQL into the SharePoint lookup column exist in the customn list it is pointing to. It
    is important to have this column be a lookup column as it links to another custom list that has many more columns of related information.
    I have read and re-read the SharePoint SSIS Adapters 2011.docx from
    http://sqlsrvintegrationsrv.codeplex.com/ and the only section that seems to apply is this:
    "Looking Up Values in a SharePoint List
    If you have to look up a value in a SharePoint list, you can use the Lookup transformation in your data flow, and use the SharePoint List source to load the lookup table. You may have to add a Derived Column transformation or a Script component that splits
    data in the lookup column on the ";#" delimiter to separate the ID value from the description.
    If you are replacing values in your data with the values that you look up in the list, then loading the changed data back into SharePoint, you only have to include the ID from the lookup column. SharePoint ignores the description if you include it."
    I am not sure if the above statement means that I should be passing the assocaited ID's other than the actual data into the SharePoint List destination. If that is the case, that will not really work as the lookup contains hundreds of rows. Not too mention
    I have several of these lookup column types pointing to several different lists.
    Any guidance in how I can put data into a SharePoint Lookup column type via Data Flow Task would be so much appreaciated.
    Thank you.
    My errors are:
    Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID="1": 0x1 - Unspecified error, such as too many items being updated at once (batch), or an invalid core field value.
    Error: 0xC0047062 at Data Flow Task, SharePoint List Destination [1903]: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32
    inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "SharePoint List Destination" (1903) failed with error code 0x80131500 while processing input "Component Input" (1912). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will

    I have found a solution to my problem and thought I would share it here in case there are others who are struggling with the above scenario. If you have a better way, I would love to hear about it since my way is a bit tedious.
    In a nutshell, in order to have an SSIS package put data from an OLE DB Source into a SharePoint List Destination Lookup Column, you need to pass the ID of the value that is being looked up, not the value that is in the “master” OLE DB source.
    Rough explanation, OLE DB Source value for column “Approp” is “4005” --> SQL matches “4005” with the ID in the new lookup table (“4005” = ID “5” as defined in the SharePoint lookup list) --> “5” gets passed into SharePoint List destination lookup
    column --> SharePoint displays “4005” and successfully links to the lookup list.
    Funny thing (not really), the error(s) outlined in my original post are not related in getting data into a SharePoint Lookup column as I am now successful in getting data into the system but I am still getting the same above error(s). I think it has to do
    with the ID column in the SharePoint list destination. What I can’t seem to figure out is why since I am not linking any data to that ID column (at least on new records). I am however linking it on Update and Delete and the errors mentioned above disappear
    and things work well.
    There are three tasks that need to get done in order to get data from SQL into a SharePoint lookup column assuming you have already set up your SharePoint lookup lists:
    1. Create new lookup table(s) in SQL that has the IDs from the SharePoint Lookup list and the values coming from the “master” OLD DB Source. You can see the ID column in SharePoint by toggling it on in a view.
    2. Create a SQL command that JOINs all the databases and tables so that the ID is passed and not the value into the SharePoint lookup column
    3. Change the “Data access mode” to “SQL Command” instead of the “Table or view” in the OLE DB Source and paste your command into the “SQL command text:” area.
    Other helpful info is that you may also need to add additional columns in the new lookup tables in SQL for the scenarios when the data is not unique. You can see this two times in my SQL command example for Units and JobTitles:
    SELECT
    pps.SSNm,
    pps.file_updated,
    pps.Employee_id,
    /* pps.CheckDistNm,*/
    Check_Distribution_id = COALESCE( d.ID, 0 ),
    pps.Job_nbr,
    pps.SeqNm,
    pps.action_eff_dt,
    Fund_id = COALESCE( f.id, 0 ),
    Appropriation_id = COALESCE( ap.id, 0 ),
    ActionCode_id = COALESCE( ac.id, 0 ),
    SpecNumber_id = COALESCE( jt.ID, 0 ),
    pps.Employee_id,
    /* pps.Fund,
    pps.Approp,
    pps.Unit,*/
    Unit_id = COALESCE( u.ID, 0 ),
    PosNm,
    PosCode,
    pps.LastName,
    pps.FirstName,
    pps.MI
    FROM
    x_PPS.aReportVw.pps_screens_active AS pps
    LEFT OUTER JOIN dbo.DistributionNumbers AS d ON
    pps.CheckDistNm = d.Check_Distribution
    LEFT OUTER JOIN dbo.Units AS u ON
    pps.Fund = u.Fund AND
    pps.Approp = u.Approp AND
    pps.Unit = u.Unit
    LEFT OUTER JOIN dbo.Appropriations AS ap ON
    pps.Approp = ap.Approp
    LEFT OUTER JOIN dbo.Funds AS f ON
    pps.Fund = f.Fund
    LEFT OUTER JOIN dbo.ActionCodes AS ac ON
    pps.ActionCode = ac.ActionCode
    LEFT OUTER JOIN dbo.JobTitles AS jt ON
    pps.SpecNm = jt.SpecNumber AND
    pps.JurisClass = jt.JurisClass

  • RowSet Column Type Mismatch Error

    Hi,
    I am using SOA 11g,
    JDeveloper 11.1.1.3.0
    BPEL, SOA 11g, DB2 Stored procedure,
    In a BPEL service I am getting this error while invoking a DB2 Stored procedure with Strong XSD.
    while running I am getting this error message. This error message while invoking DB2 stored procedure, both XSD are identical. Input to service & input to DB adapter.
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'dba' failed due to: RowSet Column Type Mismatch Error. The SQL type in the XSD (CHARACTER) does not match the SQL type in the RowSet (VARCHAR) for column LONGITEM of parameter RowSet. This procedure returns a RowSet which could in theory return any arbitrary result. However you chose at design time to generate a single strongly typed XSD describing this result set in all cases, based on a test execution of the stored procedure. This makes later XML transforms easier. You may have also edited the XSD directly. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    -CD

    Hi CD,
    maybe if your strong XSD contains db:type="CHAR", you could try to change it to "VARCHAR" instead.
    HTH,
    Steve

  • Invalid column type error while calling db function.

    We are getting an exception while calling the database function which returns a Varray of objects. We are using jpub to generate the wrapper method, ran sqlj to generate the JDBC code. The environment is weblogic 5.1 EJB container with ORacle 8.1.6.0.0 database. The JDBC driver is 8.1.7 thin, sqlj version is 8.1.7. I am giving below the exception.
    When the sqlj option profile=false is not set, the error is Classcast exception. Appraently the weblogic connection object can not be used to do oracle specific calls. If somebody has done similar things(creating a bean which calls the stored function with weblogic which returns the oracle object types) or know what the issue is, please let me know.
    Thanks,
    Vijay.
    stackTrace:
    java.sql.SQLException: Invalid column type
    at java.lang.Throwable.fillInStackTrace(Native Method)
    at java.lang.Throwable.fillInStackTrace(Compiled Code)
    at java.lang.Throwable.<init>(Compiled Code)
    at java.lang.Exception.<init>(Compiled Code)
    at java.sql.SQLException.<init>(SQLException.java:43)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:225)
    at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:350)
    at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:438)
    at sqlj.runtime.profile.ref.RTStatementJDBCCallable.registerOutParameter(RTStatementJDBCCallable.java:135)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.registerParameters(Compiled Code)
    at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.getStatement(ParamRegProfile.java:101)
    at sqlj.runtime.profile.ref.CachedStatementProfileWrapper.getStatement(CachedStatementProfileWrapper.java:134)
    at sqlj.runtime.ExecutionContext$StatementStack.setStatement(ExecutionContext.java:995)
    at sqlj.runtime.ExecutionContext.registerStatement(ExecutionContext.java:523)
    at com.xpede.calculator.processor.jdbc.NewPrdGroupPkg.maincalculator(NewPrdGroupPkg.java:341)
    ----------------------

    Weblogic essentially wrappers the Oracle JDBC driver - as you can see from the stack trace, it does not just wrapper the connection object, but also the statement object.
    The SQLJ runtime does not recognize the JDBC layer anymore as an Oracle JDBC driver.
    What is happening at runtime may be the following:
    (1) The invalid column type likely results from SQLJ attempting to register the type as Types.OTHER (code 1111). This typecode is not supported by Oracle JDBC.
    (2) The class cast exception when using Oracle objects may result from a getObject() call which returns the value in default format (such as oracle.sql.ARRAY) rather than the JPublisher-generated wrapper object.
    Are you using JDK 1.2 / runtime12.zip?
    In that case you can try the standard (java.sql.)SQLData interface (in JPub: -usertypes=jdbc). However, this interface will not support wrappers for VARRAYs.

  • Proper showing value of a column type chart in BI 7.0

    Hi,
    I am in BI 7.0.  I created a Web template with column type chart.  I want to show the column value only when users move the cursor on top of the column.
    The problem is when system showing value also show the category/serious and category description.  Is there any way to show value only?
    Thanks for your help,
    Frank

    Hi Wond,
    Thanks for your quick response. 
    Your solution is for BW 3.5 or BI 7.0?  I remember with BW 3.5, WAD has chart property and option.  But, I don’t think BI 7.0 has chart option.  I am with BI 7.0.  I clicked on property and nothing happens.  I don’t know is my system setup issue or other.  When I modify chart property, I have to use Edit -> Wizard or Refine.
    Any other solution?
    Regards,
    Frank

  • The priority of different data type conversion

    Hi All,
    I want to know the priority of data type conversion rule. if in an expression, I have several kind of data type( I, P, F,N..).
    Then finaly, all the data object will convert to which data type?
    I don't know the priority of data conversion.
    E.g.   data a type i. data b type p. data c type f.
             a = b + c.
    or    data d type p, data e type f.
          if ( d > f ).
    Then who will convert to who's type?
    Thanks and Regards.
    Aaron

    For expressions, the right term in SAP is "calculation type", it's explained here : [abap help - determining the calculation type|http://help.sap.com/abapdocu_70/en/ABENARITH_TYPE.htm]. SAP takes the "biggest" type of all variables in the expression. It can be I, P or F (smallest is I, biggest is F).
    Conditions are handled differently, just using data type conversion (see link given above by Abhishek), SAP converts from smallest to biggest type (in your case, it converts P to F and compares the two F variables).

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

Maybe you are looking for

  • Exchange calendar not in calendar list on PRE

    So after 3 weeks of working on getting exchange set-up I finally did it.  Contacts and Email work great but the Calendar shows up in my account list but when I go through my calendar's via the drop down menu at the top right in the calendar view, my

  • Error while posting Goods issue

    Hi, I am trying to do a PGI for a delivery.It first goes to the "Detailed data for Handling unit XXXXXX" Screen and then if I click BACK , it goes to " Display Handling Units " Screen and then gives me an error : Risk of posting several mat. document

  • Adober Reader suddenly won't open any PDF files (Mac)

    I had an old version, I downloaded the latest one, upgraded to the newest, even tried taking that one out and downloading an older version. It doesn't matter which version I seem to have, it won't open any pdf files from the web. I use a Mac, and Saf

  • How do i get my desktop back on my laptop

    how do i get my desktop back on my laptop i dont get images on facebook

  • I updated to itunes 11 and my playlist disappeared

    i updated to itunes 11 and my playlist disappeared please help