Loading ntext data from MSSQL into Oracle - field locations vary

Good afternoon/evening everyone
I'm looking for a practical solution to a data migration issue I am running into. Here's the detail.
1. Source database is Microsoft SQL Server 2008 R2
2. Destination database is Oracle 11g R2.
3. Migration strategy: Use MSSQL Management Studio Export Wizard to export all tables into flat files and then use SQL*Loader to load into Oracle.
Sounds easy...Here's the problem I'm running into:
1. Several tables have ntext data.
2. The location of ntext attribute within the table varies by table.
3. The number of ntext attributes in the source table varies by table.
4. I'm using a field delimiter to split the data.
What I am running into:
1. There is nothing within the data for the ntext field that is common that would allow me to use a CONTINUEIF to cause the multiple physical records to be concatenated into a logical record.
2. The number of physical records very for creating the logical record.
3. Other data exists after each ntext attribute that is either ntext or non-ntext data.
What I'm looking for:
1. Would like to use SQL*Loader, if possible; otherwise I'll write a PL/SQL procedure to read the data, row for row, and load it into the appropriate fields.
2. Looking for ideas from the Forum experts to provide some Control File syntax that would accomplish what I'm trying to do. I'm out of ideas.
I would appreciate some assistance and some ideas if you have any.
Thanks in advance
Stephen Karniotis
[email protected]

is this what you are looking for?
    select replace('this a text with\X0D\X0Ain it', '\X0D\X0A', chr(13) || chr(10)) from dualyou can do the replace directly when loading by putting "replace(:fieldname, '\X0D\X0A', chr(13) || chr(10))"
next to the field in the controll file you use with sql*loader (including the " signs). Or you can use it in an update statement.
greetings
Freek D

Similar Messages

  • How to load the data from informatica into bw & how to report the data

    Hi friends,
    how to load the data from informatica into bw & how to report the data
    using cognos.(i.e how to access the data in sap bw using cognos 8 BI suite).
    Thanks,
    madhu.

    Inorder to report BW data into Cognos you can extract data from using Open Hub to the DB table from which Cognos reads.
    For BW informatic integration refer following docs:
    http://www.aman.co.il/aman/pfd/DataInteg_BR.q103cd.pdf.pdf
    http://h71028.www7.hp.com/enterprise/cache/3889-0-0-225-121.html
    http://devnet.informatica.com/learning/ePresentations.asp
    http://72.14.203.104/search?q=cache:C741L86Q19oJ:devnet.informatica.com/showcase/resources/Essbase_DataSheet.pdfinformaticapowerconnect(BI)&hl=en&gl=in&ct=clnk&cd=3
    http://www.informatica.com/customers/utilities_energy/fpl_group.htm
    http://www.informatica.com/solutions/resource_center/technote_sapbw_65241004.pdf#search=%22Informatica%20to%20Bw%22

  • Lookout 6.2 loading buffered data from PLC into Citadel database?

    We are testing a Lookout small process application <200 I/O that is designed for continuous application. This is not a critical process, therefore we don't want to commit to duplicate Lookout Systems. However, we would like to buffer 24 words(16bit) in the PLC for 5-10 minutes so we would not loose that data when the computer running Lookout does a restart for example.
    Our problem is how do we get this data into LookOut Citadel database in the proper time frame.
    If loading this data into Citadel is not possible with the original trace, can we load into another database file and view this data separately?
    Any suggestions would be appreciated!
    Solved!
    Go to Solution.

    First, you need to be able to get the data as well as the timestamp from the PLC.
    With all the data and timestamp, you can use the Logger object to log data to Citadel. Take a look at this example. The Logger_discrete object.
    http://zone.ni.com/devzone/cda/epd/p/id/3816
    But the problem is that the data is not logged to the original trace. It is logged to the logger object trace.
    Ryan Shi
    National Instruments

  • Import/insert data from XML into Oracle database tables?

    Hi. (I am using JDeveloper 10.1.3.3.0 and Oracle 10g)
    I have been able to export the data from one of my database tables by using a View Object and .writeXML.
    Now, I want to take an xml file that is formatted in the same way as what is spit out by the writeXML and put that info in my database table. I followed online examples and have tried using .readXML like so:
    Element element = XMLDoc.getDocumentElement();
    vo.readXML(element, -1);
    I know it is sort of working, because at first I got an error message that one of the required attributes was missing. So, I added that attribute to my xml file and ran my code. No errors. But, I checked my database, and the new records were not added.
    Is there something I have done wrong? Or is there perhaps something I left out? I also noticed there were several versions of readXML like readFromXML. Which one should I use and how?
    Thanks.

    KUBA, I changed my code to match your example:
    DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    File xmlFile = new File("C:/myfilehere.xml");
    Document doc = db.parse(xmlFile);
    Element element = doc.getDocumentElement();
    vo.readXML(element, -1);
    vo.getDBTransaction().commit();
    I still get no errors, but my database table has no new records.
    Any ideas why?
    Thanks.

  • Loading of data from XML into Portal

    Hi,
    I have a XML schema generated from a Word document, containing chapters and appendices in diffrent levels.
    Is it possible to load this document into Portal text items, keeping the chapter/appendix structure?
    Regards,
    Nathalie

    Several third-party tools support converting a DTD into a "first-cut" XML Schema. It likely will need a lot of subsequent work to get it into a useable format -- since for example, all of the datatypes would need to be string.
    The tools I've personally used to accomplish this (and surely there are others) are:
    [list]
    [*]XML Authority from Extensibility
    [*]XML Spy 3.0 from Icon Software
    [list]
    The canonical format for XSU insert is precisely the default output format you would get by using XSU to generate XML for a select * from tablename statement.

  • Inserting data from excel into oracle db

    I have data in excel files. Can I insert it in Oracle DB??
    any example will be highly appreciated
    thanks and kind regards

    See CSV-Database example based on Scriptella ETL tool.:
    http://snippets.dzone.com/posts/show/3508
    P.S. You will have to export Excel file into CSV.

  • Data from mssql to oracle

    Hi
    need to configure Tg4msql , databaseis 11G 11.2.0.1.0 on windows
    How do i configure TG4msql on 11G
    Thanks

    This is the forum for Oracle' SQL Developer tool. You would do better asking your question in the Heterogeneous Connectivity Forum. Heterogeneous Connectivity
    You should also try reading the manual http://tahiti.oracle.com

  • How to load data from Quikbooks into PeopleSoft General Ledger module ?

    Folks,
    Hello.
    My client's data is currently stored in Quikbooks.
    After install PeopleSoft FSCM 9.0, I need to load the data from Quickbooks into PeopleSoft General Ledger module. But I don't know how to use PeopleSoft Integration Broker to integrate with Quikbooks.
    Can any folks tell me how to load data from Quikbooks into PeopleSoft General Ledger module ?

    Hi,
    If the data load is one time process, then you can use PL/SQL or datamover to load the data to PeopleSoft application.
    If you want to load the data in real time, then you need to create In-bound and out-bound nodes to perform the transaction.
    Thanks
    Soundappan

  • How  to load the data from excel  file  into table in oracle using UTL_FI

    How to load the data from excel file into table in oracle
    and from table to excel file
    using UTL_FILE package
    Please give me some example

    This is something i tried in oracle apex
    http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
    Regards,
    CKLP

  • How to Load the data from excel file(Extension is .CSV) into the temp.table

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Hello Sachin,
    You can use the following metalink note:How to Read Data from an EXCEL Spreadsheet into a Form Using Webutil Client_OLE2 (Doc ID 813535.1) and modify it a little bit.
    Instead of copy values into forms you can save them in your temporary table.
    Kind regards,
    Alex
    If someone's helpful or correct please mark it accordingly.

  • How to load the data from excel file into temprory table in Forms 11g?

    Hi
    How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
    My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
    Kindly Suggest the Solution.
    Regards,
    Sachin

    Declare
        v_full_filename         varchar2(500);
        v_server_path           varchar2(2000);
        v_separator             VARCHAR2(1);
        v_filename              VARCHAR2(400);
        filename                VARCHAR2 (100);
        v_stop_load             varchar2 (2000);
        v_rec_error_log         varchar2(4000);
        v_error_log             varchar2(4000);
        ctr                     NUMBER (12);
        cols                    NUMBER (2);
        btn                     number;
        RES                     BOOLEAN;   
        application             ole2.obj_type;
        workbooks               ole2.obj_type;
        workbook                ole2.obj_type;
        worksheets              ole2.obj_type;
        worksheet               ole2.obj_type;
        cell                    ole2.obj_type;
        cellType                ole2.OBJ_TYPE;
        args                    ole2.obj_type;
        PROCEDURE olearg
        IS
        args   ole2.obj_type;
        BEGIN
        args := ole2.create_arglist;
        ole2.add_arg (args, ctr);                                
        ole2.add_arg (args, cols);                                   
        cell := ole2.get_obj_property (worksheet, 'Cells', args);
        ole2.destroy_arglist (args);
        END;
    BEGIN
    v_full_filename := client_get_file_name(directory_name => null
                                     ,file_name      => null
                                     ,file_filter    => 'Excel  files (*.xls)|*.xls|'  
                                                                            ||'Excel  files (*.xlsx)|*.xlsx|'                                                                 
                                     ,message        => 'Choose Excel file'
                                     ,dialog_type    => null
                                     ,select_file    => null
    If v_full_filename is not null Then
    v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
    v_filename := v_separator||v_full_filename ;
    :LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);                                
    RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));     
    --Begin load data from EXCEL
    BEGIN
        filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
        application := ole2.create_obj ('Excel.Application');
        ole2.set_property (application, 'Visible', 'false');
        workbooks := ole2.get_obj_property (application, 'Workbooks');
        args := ole2.create_arglist;
        ole2.add_arg (args, filename); -- file path and name
        workbook := ole2.get_obj_property(workbooks,'Open',args);
        ole2.destroy_arglist (args);
        args := ole2.create_arglist;
        ole2.add_arg (args, 'Sheet1');
        worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
        ole2.destroy_arglist (args);
        ctr := 2;                                                     --row number
        cols := 1;                                                -- column number
        go_block('xxx');
        FIRST_RECORD;  
        LOOP       
                --Column 1 VALUE --------------------------------------------------------------------
            olearg;
            v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            :item1 := v_stop_load;
            cols := cols + 1;                                                      
              --Column 2 VALUE --------------------------------------------------------------------
            olearg;
            :item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
            cols := cols + 1;
            --<and so on>
        ole2.invoke (application, 'Quit');
        ole2.RELEASE_OBJ (cell);
        ole2.RELEASE_OBJ (worksheet);
        ole2.RELEASE_OBJ (worksheets);
        ole2.RELEASE_OBJ (workbook);
        ole2.RELEASE_OBJ (workbooks);
        ole2.RELEASE_OBJ (application);
    END;
    --End load data from EXCELPlease mark it as answered if you helped.

  • Best practice for loading from mysql into oracle?

    Hi!
    We're planning migrating our software from mysql to oracle. Therefore we need a migration path for moving the customer's data from mysql to oracle. The installation and the data migration/transfer have to run onto different customer's enviroments. So migration ways like installing the oracle gateway and connect for example via ODBC to mysql are no option because the installation process gets more complicated... Also the installation with preconfigured oracle database has to fit on a 4,6 GB dvd...
    I would prefer the following:
    - spool mysql table data into flat files
    - create oracle external tables on the flat files
    - load data with insert into from external tables
    Are there other "easy" ways of doing migrations or what do you think about the prefered way above?
    Thanks
    Markus

    Hi!
    Didn't anyone have this requirement for migrations? I have tested with the mysql select into file clause. Seems to work for simple data types - we're now testing with blobs...
    Markus

  • Sql loader loading data from legacy to Oracle

    Hi
    we have a requirement that we need to import data from legacy to oracle AR.We know that we need to put the data file in BIN folder,but I want to know about the data file source if we place in windows folder instead of BIN directory will SQL loader picks the file and loads the data.
    Thanks
    Y

    Yes,
    Refer this
    http://www.oracle.com/technology/products/database/utilities/htdocs/sql_loader_overview.html
    * Load data across a network. This means that a SQL*Loader client can be run on a different system from the one that is running the SQL*Loader server.
    * Load data from multiple datafiles during the same load session
    * Load data into multiple tables during the same load session
    * Specify the character set of the data
    * Selectively load data
    * Load data from disk, tape, or named pipe
    * Specify the character set of the data
    * Generate sophisticated error reports, which greatly aid troubleshooting
    * Load arbitrarily complex object-relational data
    * Use either conventional or direct path loading.
    -Arun

  • " (quotes) is column values when loading data from csv to oracle table

    I am loading a data from csv file to an oracle table.
    After the data is loaded , lets suppose the value in one column is X.
    when i write a query to fetch data like
    select * from table where col='X' then it gives no output.
    On investigating it was found that the value is stored in col as "X".
    This also happens when i copy paste the value from column to some text editor ....
    i want to remove these double quotes , and also want to know why these are coming...
    Any suggestions guys ?
    Thanks
    Using Oracle 10g

    These quotes are part of your data file. Most CSV-parsers remove those quotes.
    If you are using an external table you can remove them by something like this for your access parameters
    ORGANIZATION EXTERNAL
      TYPE ORACLE_LOADER
      ACCESS PARAMETERS
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        OPTIONALLY ENCLOSED BY '"'
    But if you want to remove them from your existing data use this
    update your_table
      set col1 = trim( '"' from col1 )
    Note that in some CSV-files wich use an enclosing character the enclosing character is itself is used as an escape character to use the enclosing character inside a field.
    For example a field might be "Some text with ""this"" enclosed"
    To correct these fields you might use another update
    update your_table
      set col1 = replace( col1, '""', '"' )

  • How to load the data from .csv file to oracle table???

    Hi,
    I am using oracle 10g , plsql developer. Can anyone help me in how to load the data from .csv file to oracle table. The table is already created with the required columns. The .csv file is having about 10lakh records. Is it possible to load 10lakh records. can any one please tell me how to proceed.
    Thanks in advance

    981145 wrote:
    Can you tell more about sql * loader??? how to know that utility is available for me or not??? I am using oracle 10g database and plsql developer???SQL*Loader is part of the Oracle client. If you have a developer installation you should normally have it on your client.
    the command is
    sqlldrType it and see if you have it installed.
    Have a look also at the FAQ link posted by Marwin.
    There are plenty of examples also on the web.
    Regards.
    Al

Maybe you are looking for

  • Help needed in JSP Expression Language

    Hi all, I have been working for JSP Expression Language Sample execution since past 5 days. I am using the application server as "Jboss Server" and web server as "Tomcat". I have been included the jsp-api.jar file in my lib directory of application s

  • Enum confusion! Logical or in an if statement

    I'm using enums for the first time and I'm a bit confused. I have: if (type != (Board.PIT | Board.NORMAL | Board.PAIR | Board.ROT | Board.UNDER                    Board.NORTH | Board.EAST | Board.SOUTH | Board.WEST) )          isUpper = true;     Ecl

  • Clarification about plant and terms of payment In Master Data:

    Hello Gurus, I have a doubt as follows: 1) In Material master (MM01) we are maintaining Plant as two types.      a) Plant at organisation leve pop up at the begining      b) Delivering plant at Sales organisation 1. So, is there any difference betwee

  • PL statement(Ecc6.0)

    Hi Friends, We are on bpc75nw sp04. I want to build profit & loss statement in Evdre report, is it possible if all GL balances(from ECC6.0) are avilable in BPC cube. I know in BW via BEx Queries with some customization(virtual cube, function module),

  • Imports in robohelp

    how the imports work in robohelp 6?? how can i use it?