Converting Stuff function from SQLServer to Oracle

Anyone out there found an Oracle counterpart for the SQL Server "stuff" function.
It is being used following an ascii(substr(variable)) locating all nonprintable characters and replacing with null.

anjali5 wrote:
I am very new to oracle. I am trying to convert this function to oracle, but keep getting errors
USE [REF]
GO
/****** Object: UserDefinedFunction [dbo].[fnc_get_home] Script Date: 10/21/2011 17:50:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:          <Author,,Name>
-- Create date: <Create Date, ,>
-- Description:     <Description, ,>
-- =============================================
ALTER FUNCTION [dbo].[fnc_get_home]
     @p_ui nvarchar(50), @p_dt datetime
RETURNS NVARCHAR(50)
AS
BEGIN
     declare @v_home NVARCHAR(50);
     select top 1 @v_home = HOME_CODE from dbo.activity_home_b
          where UI = @p_ui
          order by HOME_END_DT desc;
     RETURN @v_home;
ENDI am very new to Volkwagen cars, but here is a picture of my old Toyota
My new car won't go
Tell me how to make my car go.
You refer to Oracle, but I wonder if this has anything to do with ACCESS.
post complete CREATE TABLE statement of Oracle Table
post INSERT for sample test date & expected/desired results

Similar Messages

  • Alternate for stuff function of sqlserver

    Hi,Can Anyone please help me in migrating following code from sqlserver to oracle.
    set @sLastItemInPkts_2 = Stuff(@sLastItemInPkts_2,
    @iOffset,
    @iElementSize,
    SubString(@sLastItemInPkts_1,
    @iOffset,
    @iElementSize)
    set @sLastItemInPkts_1 = Stuff(@sLastItemInPkts_1,
    @iOffset,
    @iElementSize,
    Convert(varChar(10),
    Replace(Str(@iDocId, @iElementSize),
    0))
    Thanks in advance.

    If we need to replace in a string not a certain sequence of characters, but a specified number of characters, starting from some position, it's simpler to use the STUFF function:
    STUFF ( <character_expression1> , <start> , <length> , <character_expression2> )
    This function replaces a substring with length of length that starts from the start position in the character_expression1 with the character_expression2.

  • Migrate HFM (9.3) from Sqlserver to Oracle

    Hello.
    We are using Sqlserver for HFM for historical reason, but now we would like to change
    our database to Oracle for improve performance and for licenses reason.
    We want to organize migration and some tests.
    I checked OTN and Metalink and I didn't find anything related to HFM.
    I have found a lot of documentation about migration from Sqlserver to Oracle,
    but I would like to find and read something specific related to HFM repository.
    Maybe Oracle suggests to do some premigration task
    or some postmigration task.
    How can I find this kind of documentation?
    There is anyone that have already done this kind of job?
    Some suggestion?
    Thanks in advance.
    D.
    Edited by: Spugna on May 20, 2011 8:33 AM
    Edited by: Spugna on May 20, 2011 8:34 AM

    You can use the HFMCopyApp utility, which ships with HFM, under the \Server folder on each HFM app server. There are other threads in this forum on how to use this utility. It will allow you to copy from one RDBMS to another.
    Each product however, is different in terms of migrating between RDBMS. FDM, for example, requires a rebuild. So you will have to check into each component. As for performance being better under Oracle vs. SQL Server, that's a matter of tuning and opinion. I would make sure performance will in fact be better before I undertook this project. License costs should be much more clear, of course.
    --Chris                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Need to fatch the data from sqlserver to Oracle DATABASE ;not migration

    Hello,
    What is the easiest method to insert/refresh data into Oracle Tables from SQLSERVER 2005 table.Do I need ODBC connection and how it works in the PL/SQL to create the connection and fetch the data from sqlserver.
    Thanks,
    Sarabmann

    I need to fetch from ORACLE back-end ,for example I want to install the mechanism at the back-end server where if I write stored procedure and call this link which enable me to fetch the data from sqlserver.
    Environment:- Linux as OS
    Oracle 10G as a Database

  • Moving NVARCHAR data from SQLSERVER to Oracle

    We are moving data from NVARCHAR field in SQLSERVER to Oracle. The data is getting changed
    (Opl›st) --> (Opl¿st)
    Any suggestion what may be wrong?
    - PB Singh

    Yes the databases are setup for proper character set.
    LKM SQL to Oracle is used.
    One question is any thing needed in jdbc driver to enable multibyte access.
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    Thanks,
    PB Singh
    Message was edited by:
    pbsingh

  • Migrating from sqlServer to Oracle

    Sir,
    My name is ramandeep singh and I hail from india and I work as a computer programmer
    cum incharge computer software.Presently we are using SQL Server and we intend to update
    our existing database to Oracle/Dev 2000.Please provide me the details.
    I am a OTN memeber.
    please get back to me as soon as possible.
    My mail id is [email protected],
    [email protected]

    You Can Convert Yours Database from SQL Server to oracle Write A VB Program that open two connections one to SQL Server And Another To Oracle then By Yours Program Read The Specified Records from Sql Server And insert it in the ORACLE.
    About the Tables And Views Genrate A script from SQL Server Option The Take The Commands Of creating tables and modify the datatype to oracle datatype the run the script in the SQL Plus .
    About the Programs you must rebuild it on developer2000
    Anjad H.S.
    DB Programmer

  • Migration from SqlServer to Oracle

    I am using Sqldeveloper 1.2.1
    I am trying to migrate sql server 2000 data to Oracle..
    For that i had created two connections for oracle & SqlServer.
    SqlServer and Oracle connections were made sucessfully, i am able to view the database and table.
    Now i am doing migration process..
    In Oracle conn i had selected Create Repository then
    in SqlServer conn i selected "Capture Microsoft SqlServer".
    Now Capturing Database is running long time.
    No messsage is displayed..
    Is my way is correct?
    Pls provide solution.

    Hi Shivasha,
    If you are using 11g, the the solution is here (the 3rd post):
    Re: SQL Developer in Oracle 11g
    Andrei

  • Convert substring function from SQL Server to Oracle

    I am converting a large application written for SQL Server to Oracle and have encountered a difference in how the substring function is called between the two database systems.
    In SQL Server:
    select substring('xyz'1,2)
    In Oracle:
    select substr('xyz',1,2)
    Is there a way to establish a user-defined operator to map the substring call to a substr call so I don't have to change the application code?
    Is the user-defined function a way to do this?
    Which is better?

    If you want to be able to use the code that has substring in it, without modifying it, and have it do the same thing as substr, then try running the script below. It will create a user-defined function named substring that will cause substring to act like substr.
    CREATE OR REPLACE FUNCTION substring
    (p_string IN VARCHAR2,
    p_start IN VARCHAR2,
    p_end IN VARCHAR2 DEFAULT NULL)
    RETURN VARCHAR2
    IS
    v_string VARCHAR2 (100);
    BEGIN
    IF p_end IS NULL
    THEN
    SELECT SUBSTR (p_string, p_start)
    INTO v_string
    FROM DUAL;
    ELSE
    SELECT SUBSTR (p_string, p_start, p_end)
    INTO v_string
    FROM DUAL;
    END IF;
    RETURN v_string;
    END substring;
    null

  • Bad performing update query - converting from sqlserver to oracle

    SQLSERVER UPDATE
    =================
    UPDATE
    netVIEWplus.dbo.DIM_OUC_Latest
    SET
    OUC = LatestDIM.OUC,
    OUC_Desc = LatestDIM.OUC_Desc,
    OUC_Level = LatestDIM.OUC_Level,
    Parent_OUC = LatestDIM.Parent_OUC,
    CC_Type = LatestDIM.CC_Type,
    GFR = LatestDIM.GFR,
    CORP = LatestDIM.CORP,
    SOB = LatestDIM.SOB,
    Div_Unit = LatestDIM.Div_Unit,
    Div_Desc = LatestDIM.Div_Desc,
    L1_OUC = LatestDIM.L1_OUC, L1_DEPT_DESC = LatestDIM.L1_DEPT_DESC,
    L2_OUC = LatestDIM.L2_OUC, L2_DEPT_DESC = LatestDIM.L2_DEPT_DESC,
    L3_OUC = LatestDIM.L3_OUC, L3_DEPT_DESC = LatestDIM.L3_DEPT_DESC,
    L4_OUC = LatestDIM.L4_OUC, L4_DEPT_DESC = LatestDIM.L4_DEPT_DESC,
    L5_OUC = LatestDIM.L5_OUC, L5_DEPT_DESC = LatestDIM.L5_DEPT_DESC,
    L6_OUC = LatestDIM.L6_OUC, L6_DEPT_DESC = LatestDIM.L6_DEPT_DESC,
    L7_OUC = LatestDIM.L7_OUC, L7_DEPT_DESC = LatestDIM.L7_DEPT_DESC,
    L8_OUC = LatestDIM.L8_OUC, L8_DEPT_DESC = LatestDIM.L8_DEPT_DESC,
    Current_Flag = LatestDIM.Current_Flag,
    INF_Div_Unit_Only = LatestDIM.INF_Div_Unit_Only,
    INF_DIM_OUC_Id_Used = LatestDIM.DIM_OUC_Id
    FROM
    netVIEWplus.dbo.DIM_OUC_Latest
    INNER JOIN
    netVIEWplus.dbo.DIM_OUC HistoryDIM
    ON
    HistoryDIM.DIM_OUC_Id = netVIEWplus.dbo.DIM_OUC_Latest.DIM_OUC_Id
    INNER JOIN
    netVIEWplus.dbo.DIM_OUC LatestDIM
    ON
    LatestDIM.DIM_OUC_ID = HistoryDIM.Latest_Id
    Oracle Version
    ===========
    UPDATE
    netVIEWplus.DIM_OUC_Latest T1
    SET (OUC,OUC_Desc,OUC_Level,Parent_OUC,CC_Type,GFR,CORP,SOB,Div_Unit,Div_Desc,L1_OUC,L1_DEPT_DESC,L2_OUC,
    L2_DEPT_DESC,L3_OUC,L3_DEPT_DESC,L4_OUC,L4_DEPT_DESC,L5_OUC,L5_DEPT_DESC,L6_OUC,L6_DEPT_DESC,L7_OUC,L7_DEPT_DESC,
    L8_OUC,L8_DEPT_DESC,Current_Flag,INF_Div_Unit_Only,INF_DIM_OUC_Id_Used) =
    ( SELECT LatestDIM.OUC OUC,LatestDIM.OUC_Desc OUC_Desc,
    LatestDIM.OUC_Level OUC_Level,LatestDIM.Parent_OUC Parent_OUC,LatestDIM.CC_Type CC_Type,LatestDIM.GFR GFR,
    LatestDIM.CORP CORP,LatestDIM.SOB SOB,LatestDIM.Div_Unit Div_Unit,LatestDIM.Div_Desc Div_Desc,
    LatestDIM.L1_OUC L1_OUC,LatestDIM.L1_DEPT_DESC L1_DEPT_DESC,LatestDIM.L2_OUC L2_OUC,
    LatestDIM.L2_DEPT_DESC L2_DEPT_DESC,LatestDIM.L3_OUC L3_OUC,LatestDIM.L3_DEPT_DESC L3_DEPT_DESC,
    LatestDIM.L4_OUC L4_OUC,LatestDIM.L4_DEPT_DESC L4_DEPT_DESC,LatestDIM.L5_OUC L5_OUC,
    LatestDIM.L5_DEPT_DESC L5_DEPT_DESC,LatestDIM.L6_OUC L6_OUC,LatestDIM.L6_DEPT_DESC L6_DEPT_DESC,
    LatestDIM.L7_OUC L7_OUC,LatestDIM.L7_DEPT_DESC L7_DEPT_DESC,LatestDIM.L8_OUC L8_OUC,
    LatestDIM.L8_DEPT_DESC L8_DEPT_DESC,LatestDIM.Current_Flag Current_Flag,
    LatestDIM.INF_Div_Unit_Only INF_Div_Unit_Only,LatestDIM.DIM_OUC_Id INF_DIM_OUC_Id_Used
    FROM
    netVIEWplus.DIM_OUC HistoryDIM,netVIEWplus.DIM_OUC LatestDIM
    where
    HistoryDIM.DIM_OUC_Id = T1.DIM_OUC_Id
    and
    LatestDIM.DIM_OUC_ID = HistoryDIM.Latest_Id and rownum=1)
    where exists ( SELECT 1
    FROM
    netVIEWplus.DIM_OUC HistoryDIM,netVIEWplus.DIM_OUC LatestDIM
    where
    HistoryDIM.DIM_OUC_Id = T1.DIM_OUC_Id
    and
    LatestDIM.DIM_OUC_ID = HistoryDIM.Latest_Id )
    Problem is oracle update is taking long time than sqlserver update. Can it be written in some orhet way.
    Regards,
    Koushik

    Hi,
    Have you gathered stats as well ? Did the query use index(es) as well ?
    Without any more info like explain plan, indexes, etc., further help will be unable.
    Nicolas.

  • Jdo from sqlserver to Oracle

    Hi,All
    I generate my jdo based on SQLServer2000,and here is my configure:
    pmf.jndi=java:/kodo
    com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=java
    :/TransactionManager
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBC
    PersistenceManagerFactory
    com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass=com.solarmetric.kodo.imp
    l.jdbc.schema.DBSequenceFactory
    com.solarmetric.kodo.impl.jdbc.SequenceFactoryProperties=\
    TableName=JDO_SEQUENCE \
    Increment=10
    javax.jdo.option.ConnectionDriverName=com.microsoft.jdbc.sqlserver.SQLServer
    Driver
    #javax.jdo.option.ConnectionDriverName=oracle.jdbc.driver.OracleDriver
    javax.jdo.option.ConnectionUserName=icms
    javax.jdo.option.ConnectionPassword=icms
    javax.jdo.option.ConnectionURL=jdbc:microsoft:sqlserver://sljia:1433;Databas
    eName=test;SelectMethod=cursor
    #javax.jdo.option.ConnectionURL=jdbc:oracle:thin:@sharnddc:1521:rndorcl
    javax.jdo.option.Optimistic=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.NontransactionalRead=true
    javax.jdo.option.MinPool=0
    javax.jdo.option.MaxPool=0
    then I use those JDO with Oracle8i without re-generate and re-enhance those
    classes,I encounter the following error:
    0 ERROR [main] kodo.Runtime -
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:216)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClassIn
    ternal(JDBCPersistenceManagerFactory.java:451)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClass(J
    DBCPersistenceManagerFactory.java:334)
    at
    com.solarmetric.kodo.impl.jdbc.RegisterListener.registerClass(RegisterListen
    er.java:53)
    at javax.jdo.spi.JDOImplHelper.registerClass(Unknown Source)
    at com.ipacs.als.jdo.invoice.Ivhdr.<clinit>(Ivhdr.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.ipacs.als.test.Test.class$(Test.java:113)
    at com.ipacs.als.test.Test.main(Test.java:113)
    NestedThrowablesStackTrace:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:79)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClassIn
    ternal(JDBCPersistenceManagerFactory.java:451)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClass(J
    DBCPersistenceManagerFactory.java:334)
    at
    com.solarmetric.kodo.impl.jdbc.RegisterListener.registerClass(RegisterListen
    er.java:53)
    at javax.jdo.spi.JDOImplHelper.registerClass(Unknown Source)
    at com.ipacs.als.jdo.invoice.Ivhdr.<clinit>(Ivhdr.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.ipacs.als.test.Test.class$(Test.java:113)
    at com.ipacs.als.test.Test.main(Test.java:113)
    NestedThrowablesStackTrace:
    java.lang.NullPointerException
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
    SourceImpl.java:975)
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
    rceImpl.java:548)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    321)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    314)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:63)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClassIn
    ternal(JDBCPersistenceManagerFactory.java:451)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClass(J
    DBCPersistenceManagerFactory.java:334)
    at
    com.solarmetric.kodo.impl.jdbc.RegisterListener.registerClass(RegisterListen
    er.java:53)
    at javax.jdo.spi.JDOImplHelper.registerClass(Unknown Source)
    at com.ipacs.als.jdo.invoice.Ivhdr.<clinit>(Ivhdr.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.ipacs.als.test.Test.class$(Test.java:113)
    at com.ipacs.als.test.Test.main(Test.java:113)
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:216)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
    oreManager.java:710)
    at
    com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
    y.java:112)
    at
    com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
    ..java:1516)
    at
    com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
    QueryImpl.java:1351)
    at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
    at
    com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
    1)
    at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
    at com.ipacs.als.test.Test.main(Test.java:114)
    NestedThrowablesStackTrace:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:79)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
    oreManager.java:710)
    at
    com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
    y.java:112)
    at
    com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
    ..java:1516)
    at
    com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
    QueryImpl.java:1351)
    at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
    at
    com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
    1)
    at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
    at com.ipacs.als.test.Test.main(Test.java:114)
    NestedThrowablesStackTrace:
    java.lang.NullPointerException
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
    SourceImpl.java:975)
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
    rceImpl.java:548)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    321)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    314)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:63)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
    oreManager.java:710)
    at
    com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
    y.java:112)
    at
    com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
    ..java:1516)
    at
    com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
    QueryImpl.java:1351)
    at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
    at
    com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
    1)
    at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
    at com.ipacs.als.test.Test.main(Test.java:114)
    com.solarmetric.kodo.runtime.UserException: This operation cannot be
    performed while a Transaction is active.
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
    Impl.java:1058)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
    Impl.java:1042)
    at com.ipacs.als.test.Test.main(Test.java:218)
    Exception in thread "main" Process terminated with exit code 1
    anybody can help me?
    Reagrds,
    geduo

    Geduo-
    So are you saying that this exception occurs when you are running with
    the Oracle properties in place? If so, are you sure that you have
    uncommented the correct lines (i.e., the oracle-specific ConnectionURL
    and ConnectionDriverName)? It sounds like this exception might be caused
    when there is no known driver.
    If this does not help, and you enable trace-level JDBC and SQL logging
    and post the results?
    In article <[email protected]>, geduo wrote:
    Hi,All
    I generate my jdo based on SQLServer2000,and here is my configure:
    pmf.jndi=java:/kodo
    com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=java
    :/TransactionManager
    javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBC
    PersistenceManagerFactory
    com.solarmetric.kodo.impl.jdbc.SequenceFactoryClass=com.solarmetric.kodo.imp
    l.jdbc.schema.DBSequenceFactory
    com.solarmetric.kodo.impl.jdbc.SequenceFactoryProperties=\
    TableName=JDO_SEQUENCE \
    Increment=10
    javax.jdo.option.ConnectionDriverName=com.microsoft.jdbc.sqlserver.SQLServer
    Driver
    #javax.jdo.option.ConnectionDriverName=oracle.jdbc.driver.OracleDriver
    javax.jdo.option.ConnectionUserName=icms
    javax.jdo.option.ConnectionPassword=icms
    javax.jdo.option.ConnectionURL=jdbc:microsoft:sqlserver://sljia:1433;Databas
    eName=test;SelectMethod=cursor
    #javax.jdo.option.ConnectionURL=jdbc:oracle:thin:@sharnddc:1521:rndorcl
    javax.jdo.option.Optimistic=true
    javax.jdo.option.RetainValues=true
    javax.jdo.option.NontransactionalRead=true
    javax.jdo.option.MinPool=0
    javax.jdo.option.MaxPool=0
    then I use those JDO with Oracle8i without re-generate and re-enhance those
    classes,I encounter the following error:
    0 ERROR [main] kodo.Runtime -
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:216)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClassIn
    ternal(JDBCPersistenceManagerFactory.java:451)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClass(J
    DBCPersistenceManagerFactory.java:334)
    at
    com.solarmetric.kodo.impl.jdbc.RegisterListener.registerClass(RegisterListen
    er.java:53)
    at javax.jdo.spi.JDOImplHelper.registerClass(Unknown Source)
    at com.ipacs.als.jdo.invoice.Ivhdr.<clinit>(Ivhdr.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.ipacs.als.test.Test.class$(Test.java:113)
    at com.ipacs.als.test.Test.main(Test.java:113)
    NestedThrowablesStackTrace:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:79)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClassIn
    ternal(JDBCPersistenceManagerFactory.java:451)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClass(J
    DBCPersistenceManagerFactory.java:334)
    at
    com.solarmetric.kodo.impl.jdbc.RegisterListener.registerClass(RegisterListen
    er.java:53)
    at javax.jdo.spi.JDOImplHelper.registerClass(Unknown Source)
    at com.ipacs.als.jdo.invoice.Ivhdr.<clinit>(Ivhdr.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.ipacs.als.test.Test.class$(Test.java:113)
    at com.ipacs.als.test.Test.main(Test.java:113)
    NestedThrowablesStackTrace:
    java.lang.NullPointerException
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
    SourceImpl.java:975)
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
    rceImpl.java:548)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    321)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    314)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:63)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClassIn
    ternal(JDBCPersistenceManagerFactory.java:451)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory.registerClass(J
    DBCPersistenceManagerFactory.java:334)
    at
    com.solarmetric.kodo.impl.jdbc.RegisterListener.registerClass(RegisterListen
    er.java:53)
    at javax.jdo.spi.JDOImplHelper.registerClass(Unknown Source)
    at com.ipacs.als.jdo.invoice.Ivhdr.<clinit>(Ivhdr.java)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at com.ipacs.als.test.Test.class$(Test.java:113)
    at com.ipacs.als.test.Test.main(Test.java:113)
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:216)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
    oreManager.java:710)
    at
    com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
    y.java:112)
    at
    com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
    .java:1516)
    at
    com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
    QueryImpl.java:1351)
    at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
    at
    com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
    1)
    at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
    at com.ipacs.als.test.Test.main(Test.java:114)
    NestedThrowablesStackTrace:
    com.solarmetric.kodo.runtime.FatalDataStoreException
    NestedThrowables:
    java.lang.NullPointerException
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:79)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
    oreManager.java:710)
    at
    com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
    y.java:112)
    at
    com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
    .java:1516)
    at
    com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
    QueryImpl.java:1351)
    at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
    at
    com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
    1)
    at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
    at com.ipacs.als.test.Test.main(Test.java:114)
    NestedThrowablesStackTrace:
    java.lang.NullPointerException
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.createConnection(Data
    SourceImpl.java:975)
    at
    com.solarmetric.datasource.DataSourceImpl$AbstractPool.getConnection(DataSou
    rceImpl.java:548)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    321)
    at
    com.solarmetric.datasource.DataSourceImpl.getConnection(DataSourceImpl.java:
    314)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.DataSourceConnector.getConnection(Dat
    aSourceConnector.java:63)
    at
    com.solarmetric.kodo.impl.jdbc.schema.DBDictionaryFactory.getDictionary(DBDi
    ctionaryFactory.java:179)
    at
    com.solarmetric.kodo.impl.jdbc.JDBCSimpleConfiguration.getDictionary(JDBCSim
    pleConfiguration.java:377)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.getDictionary(JDBCSt
    oreManager.java:710)
    at
    com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.getExpressionFactory(JDBCQuer
    y.java:112)
    at
    com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.<init>(QueryImpl
    .java:1516)
    at
    com.solarmetric.kodo.query.QueryImpl$QueryExecutionManager.getQueryExecutor(
    QueryImpl.java:1351)
    at com.solarmetric.kodo.query.QueryImpl.internalCompile(QueryImpl.java:462)
    at
    com.solarmetric.kodo.query.QueryImpl.getAccessPathClasses(QueryImpl.java:116
    1)
    at
    com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:574)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:533)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:483)
    at com.ipacs.als.test.Test.main(Test.java:114)
    com.solarmetric.kodo.runtime.UserException: This operation cannot be
    performed while a Transaction is active.
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
    Impl.java:1058)
    at
    com.solarmetric.kodo.runtime.PersistenceManagerImpl.close(PersistenceManager
    Impl.java:1042)
    at com.ipacs.als.test.Test.main(Test.java:218)
    Exception in thread "main" Process terminated with exit code 1
    anybody can help me?
    Reagrds,
    geduo
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Migrating partially from SQLServer to Oracle

    Hi.
    Where I work, we have one server, running SQLServer7.0, that is the publication/distribution server to 3 others servers, that also have SQLServer7.0. The replication occurs only in one way: from the publication/distribution server to the 3 subscribers.
    Is there some way to migrate just one of the servers, leaving the others running SQLServer7 ? (Just for information, we can4t afford to stop ours services for long periods of time. )
    I was told that i can make a DbLink in the SQLServer7, acessing Oracle databases, but i not sure this could help us with the replication of data.

    Hi Klaus,
    Oracle provides transparent gateways for communicating with SQL Server databases. Also SQL Server provides ways of setting up DB links to Oracle (not sure how good they are though).
    However, these approaches are not a replication solution. You could emulate replication by setting up a trigger on a table or a stored procedure that would transfer data via the database link (whether it is Oracle transparent services or SQL Server).
    Regards
    John

  • Convert Sybase Update from query to Oracle PL/SQL

    Hi,
    I have a following Sybase Query for updating a table CRM_Report from another table CRM_Report1 r1, which I have to migrate PL/SQL.
    update CRM_Report
    set LT_MMT = r1.LT_MMT, ST_MMT = r1.ST_MMT,
    LT_FixedInc = r1.LT_FixedInc, ST_FixedInc = r1.ST_FixedInc,
    LT_CrdCLN = r1.LT_CrdCLN, ST_CrdCLN = r1.ST_CrdCLN,
    LT_Der = r1.LT_Der, ST_Der = r1.ST_Der,
    LT_FX = r1.LT_FX, ST_FX = r1.ST_FX,
    LT_CrdCDS = r1.LT_CrdCDS, ST_CrdCDS = r1.ST_CrdCDS
    from CRM_Report1 r1
    where r1.Location = CRM_Report.Location
    and r1.CountriesGrp_Id = CRM_Report.CountriesGrp_Id
    and r1.CountriesGrp_ShortName = CRM_Report.CountriesGrp_ShortName
    I used Oracle SQL Developer for query migration, but it doesn't seem to work
    Any Suggestions.

    In oracle
    update CRM_Report
       set (
            LT_MMT,
            ST_MMT,
            LT_FixedInc,
            ST_FixedInc,
            LT_CrdCLN,
            ST_CrdCLN,
            LT_Der,
            ST_Der,
            LT_FX,
            ST_FX,
            LT_CrdCDS,
            ST_CrdCDS
           ) =
           (SELECT r1.LT_MMT,
                       r1.ST_MMT,
                       r1.LT_FixedInc,
                       r1.ST_FixedInc,
                       r1.LT_CrdCLN,
                       r1.ST_CrdCLN,
                       r1.LT_Der,
                       r1.ST_Der,
                       r1.LT_FX,
                       r1.ST_FX,
                       r1.LT_CrdCDS,
                       r1.ST_CrdCDS
              from CRM_Report1 r1
          where r1.Location            = CRM_Report.Location
            and r1.CountriesGrp_Id       = CRM_Report.CountriesGrp_Id
            and r1.CountriesGrp_ShortName = CRM_Report.CountriesGrp_ShortName)
    WHERE EXISTS (SELECT NULL
              from CRM_Report1 r1
                where r1.Location            = CRM_Report.Location
               and r1.CountriesGrp_Id       = CRM_Report.CountriesGrp_Id
               and r1.CountriesGrp_ShortName = CRM_Report.CountriesGrp_ShortName)        

  • Calling user function from Interface mapping

    I am getting error "Bad query:ORA-00904: invalid identifier" while calling function in the mapping of an interface.
    Can some one provide the syntax of calling user function from interface mapping.
    Thanks,
    RP

    user452108 wrote:
    Can some one provide the syntax of calling user function from interface mapping.Oracle's Call Iinterface, the OCI, does not work differently when coding using a Dvorak keyboard, or writing code using a pretty pink font in the editor.. or coding the call from an interface mapping (whatever the hell that that is).
    You have 2 types of calls. SQL and PL/SQL.
    To call a function via SQL, it can be done using a the standard cursor interface. E.g.
    select MyFunkyFunction from dualIt will return the function value via a single row with a single column. The standard cursor fetch and close cursor calls are used.
    To call it via PL/SQL, an anonymous PL/SQL block is needed, and the caller needs to use a bind variable to receive the value from the function. The anon block will look as follows:
    begin
      :bindVar := MyFunkyFunction;
    end;Refer to your client's abstract layer for interfacing with the Oracle Call Interface, on how to deal with bind variables.

  • Migration Issues from Informix to Oracle (datetime format)

    Hello, i am performing a Migration from Informix to Oracle, drive by Migration Workbench, i have an error migrating data from datetime and date fields. I suppose its related by datetime and date format, cause the error tells "Incorrect day or month" when i am migrating data from informix. Targets Oracle database date format is DD/MM/YYYY and source`s Informix database date format like MM/DD/YYYY. Is there any way, in OMW, to specify the mask of datetime or date format to convert date strings from informix to oracle format? Or have i got migrate offline and modify control file to do that with sql*loader?
    How can i do that?
    Example, especify to_date('....', 'MM/DD/YYYY H24:MI:SS') format for migrating informix datetime fields to Oracle.

    The problem i have is, several tables witch contains date and datetime fields, at the same table in informix, by migrating drive by omwb to oracle, the date format i receive from informix at reading is DD/MM/YYYY and datetime format receiving is HH24:MI:SS. Migrating date and datetime types from informix to date, both types to date in oracle, i get an error while matching DD = HH24, MM = MI and YYYY = SS where nls_date_format is DD/MM/YYYY and, the same error matching HH24 = DD, MI = MM and SS = YYYY when nls_date_format is HH24:MI:SS.
    If i set nls_date_format as "DD/MM/YYYY HH24:MI:SS" i get the same error, cause reading data from informix results in data format "DD/MM/YYYY" for date fields and "HH24:MI:SS" for datetime fields.
    I have more than 200 tables in informix with this problem to migrate to oracle, i can solve by migrating offline, modifying datacontrol file to casting to_date format, but over 200 tables, 200 datacontrol files... is there any way for solving that by online migration in omwb?

  • Manual conversion from VMware to Oracle VM

    Hi,
    Could anyone please give me a detailed procedure about converting a machine from VMware to Oracle VM format?
    Our VMware machine have the "-flat.vmdk" format and OVM manager is not converting them. I was advised that I need to do the whole procedure manually.
    Thanks in advance for your help,
    Sam.

    Guys, I am happy to advise that we got a solution for this problem.
    For all those who are unable to convert from WMare to OVM because of the extension *-flat.vmdk just contact Oracle support and ask for a patch for BUG 9569399.
    Regards.

Maybe you are looking for

  • Thoroughly frustrating problem with Preview

    Hi, I'm new to the forum and tried to hold out as long as possible, but the problem I'm having has so thoroughly frustrated me I had to post this. Let me try to be as clear as possible. I have a Mac (OS 10.8.2, upgraded from a late-2009 Macbook runni

  • Can't access a web/mail server, but all other sites show up fine

    Going nuts here. Not sure if this is a network issue, Safari issue, OS issue.... I have an Aiport Extreme going into a cable modem. I have one hard wired iMac and several WiFi devices, including a MacBook Pro and an iPad running off the wireless netw

  • IMovie "finalized" but audio is different than project view - Why?

    I have just "finalized" my iMovie Project.  I am happy with the sound levels and audio ducking in project view.  Now after I have finalized the project the audio levels are too loud and ducking is not recognized when I view it full screen.  But when

  • Rounding and remving of zeros at decimal places

    i have columns like quantity, weight, volume, length, width, height if its values are 4.666 means under 5 then it should conver to 5 else if its 5.677 then it should round off the value and ifs 5.000 then it should remove the 000 and print 5 on scree

  • Download Error (-48)

    Since the latest iTunes update I have had some really strange happenings with my Apple TV. The most annoying problem is that I cannot download any content from the iTunes Store on my Apple TV. I receive a message saying that the content was not downl