Create and insert into table from Oracle to MS SQL server.

Hello,
Oracle Database 11g and Red hat 5
I have a very different kind of issue. I am handling the ORACLE db(remote db with all the important data). On the other side their is a MS SQL server db(local db with some testing data in it). All the users will access the ORACLE db for the actual processing but for sometime they need to apply some of their own concepts. So they will transfer the data from ORACLE to MS sql server.
I want to create a code in ORACLE db like a procedure , which will create a table in MS sql server , insert data into it,Also create some metadata table to keep some of my table's info on MS SQL serve db,If the table is present it should append the data, .... like many things ...
Overall my question is , how can i write a code to make these operation on a remote db, that to these operations are DDL and on MS SQL Server(Non-Oracle) ???
Please guide me with some ideas or solutions ...
Also provide if you have some good links to study ...
thanks in advance.

I'm not sure why you never visit http://tahiti.oracle.com prior to asking any question. Is it forbidden in your locale? Are you afraid of it? Will your salary be decreased when you visit the documentation?
http://www.oracle.com/pls/db111/search?word=sql+server&partno=
should provide sufficient information.
Your doc question must be considered a violation of Forum Etiquette and an abuse of this forum.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Replication of table from Oracle 10g to sql server 2000

    Could i replicate table from Oracle 10g to sql server online. we have tables with same configuration and if any change happen in oracle 10g or sql server in that table we need to replicate that change to other database.
    What is the solution for this two way replication between sql server and Oracle 10g

    But the tutorial is saying that i will have to install Oracle database on the server already having sql server, is it client or whole database, if it is then it will acquire lot of resource.
    I want to find out that for Heterogenous Service ODBC, we need third party software for ODBC Driver of SQL SERVER for Linux and secondly if we use Transparent Gateway then what are the steps for its configuration.
    I could not find steps of configuration of Transoparent gateway, when i am trying to install Transparent gateway from Universal installer, it is not there. where do i find it , Do i need to purchase it too.

  • Moving table from oracle 10g to sql server 2005 plz help!!!

    Hi All,
    I have a table in oracle that i have to move to sql server.
    I have exported the table and the dmp file is around 150 MB.
    I do not know how to import this file into sql server.
    Can some one kindly update me as to which is the best way to do this,
    i know the best people to answer this would be the sql server techs but just wanted to try my luck on OTN.
    regards,

    Hello,
    you could use the Database Gateway for MS SQL Server, create a database link that uses the gateway, and then transfer the data from Oracle to SQL Server using in SQLPlus a command like the following:
    copy from scott/tiger@ora102 -
    insert TEST1@dg4msql -
    using select * from test1@ora102 ;
    Another solution is using a PL/SQL block, and how to do it is described in the following note in My Oracle Support:
    "Insert Into Remote Table Select * From Local Table" Gives Error ORA-02025 Using DG4MSQL (Doc ID 790572.1)
    I don't know whether it is the "best way to do it", but it is an alternative.
    For inserting a flat file into SQL Server you really need to check with Microsoft. Or you can use 3rd party software: http://www.dbload.com/
    Best regards
    Wolfgang

  • How do I copy a table from Oracle DB to Sql Server 2005 db ?

    Hi , can anyone tell me what the SQL syntax would be for me to copy a table from an ORacle Database over to a SQL SERVER 2005 database ?

    Hi,
    Please look into this link,
    Re: Dump data from SQL Server Database to Oracle
    Thanks

  • What is the easiest way to export all tables data from Oracle to MS SQL Server?

    Hello MS,
    I would like to export all tables from Oracle 11.2 to MS SQL Server 2012 R1.
    Using the tool "Microsoft SQL Server Migration Assistant v6.0 for Oracle" did not work for me because there are too many warnings and errors regarding the schema creation (MS cannot know it because they are not the schema designer). My idea is
    to leave/skip the schema creation to the application designer/supplier and instead concentrate on the Oracle data export and MS SQL data import.
    What is the easiest way to export all tables data from Oracle to MS SQL Server quickly?
    Is it:
    - the „MS SQL Import and Export Data“ Tool
    - the “MS SQL Integration Services” Tool
    - not Oracle dump *.dmp format because it is a propritery binary format
    - flat file *.csv (delimited format)
    Thanks!

    Hi lingodingo,
    If you want to directly export all tables from Oracle database to SQL Server, I suggest you use SQL Server Import and Export Wizard. Because you just need to follow the wizard with GUI, this is the easiest way.
    If you want to make some modification for the tables‘ data before loading to SQL Server, I suggest you use SQL Server Integration Services package. For more details, please refer to the following similar thread:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/38b2bed2-9d4e-48d4-a33f-1d9eed1c062d/flat-file-to-sql-server?forum=sqldatamining
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Reg: read excel column and insert into table.

    hi Friends,
          i wanted to read the data from Excel and insert into in my oracle tables.
          can you provide the link or example script.
        how to read the column value from excel and insert into table.
      please help.

    < unnecessary reference to personal blog removed by moderator >
    Here are the steps:
    1) First create a directory and grant read , write , execute to the user from where you want to access the flat files and load it.
    2) Write a generic function to load PIPE delimited flat files:
    CREATE OR REPLACE FUNCTION TABLE_LOAD ( p_table in varchar2,
    p_dir in varchar2 DEFAULT ‘YOUR_DIRECTORY_NAME’,
    P_FILENAME in varchar2,
    p_ignore_headerlines IN INTEGER DEFAULT 1,
    p_delimiter in varchar2 default ‘|’,
    p_optional_enclosed in varchar2 default ‘”‘ )
    return number
    is
    – FUNCTION TABLE_LOAD
    – PURPOSE: Load the flat files i.e. only text files to Oracle
    – tables.
    – This is a generic function which can be used for
    – importing any text flat files to oracle database.
    – PARAMETERS:
    – P_TABLE
    – Pass name of the table for which import has to be done.
    – P_DIR
    – Name of the directory where the file is been placed.
    – Note: The grant has to be given for the user to the directory
    – before executing the function
    – P_FILENAME
    – The name of the flat file(a text file)
    – P_IGNORE_HEADERLINES
    – By default we are passing 1 to skip the first line of the file
    – which are headers on the Flat files.
    – P_DELIMITER
    – Dafault “|” pipe is been passed.
    – P_OPTIONAL_ENCLOSED
    – Optionally enclosed by ‘ ” ‘ are been ignored.
    – AUTHOR:
    – Slobaray
    l_input utl_file.file_type;
    l_theCursor integer default dbms_sql.open_cursor;
    l_lastLine varchar2(4000);
    l_cnames varchar2(4000);
    l_bindvars varchar2(4000);
    l_status integer;
    l_cnt number default 0;
    l_rowCount number default 0;
    l_sep char(1) default NULL;
    L_ERRMSG varchar2(4000);
    V_EOF BOOLEAN := false;
    begin
    l_cnt := 1;
    for TAB_COLUMNS in (
    select column_name, data_type from user_tab_columns where table_name=p_table order by column_id
    ) loop
    l_cnames := l_cnames || tab_columns.column_name || ‘,’;
    l_bindvars := l_bindvars || case when tab_columns.data_type in (‘DATE’, ‘TIMESTAMP(6)’) then ‘to_date(:b’ || l_cnt || ‘,”YYYY-MM-DD HH24:MI:SS”),’ else ‘:b’|| l_cnt || ‘,’ end;
    l_cnt := l_cnt + 1;
    end loop;
    l_cnames := rtrim(l_cnames,’,');
    L_BINDVARS := RTRIM(L_BINDVARS,’,');
    L_INPUT := UTL_FILE.FOPEN( P_DIR, P_FILENAME, ‘r’ );
    IF p_ignore_headerlines > 0
    THEN
    BEGIN
    FOR i IN 1 .. p_ignore_headerlines
    LOOP
    UTL_FILE.get_line(l_input, l_lastLine);
    END LOOP;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    v_eof := TRUE;
    end;
    END IF;
    if not v_eof then
    dbms_sql.parse( l_theCursor, ‘insert into ‘ || p_table || ‘(‘ || l_cnames || ‘) values (‘ || l_bindvars || ‘)’, dbms_sql.native );
    loop
    begin
    utl_file.get_line( l_input, l_lastLine );
    exception
    when NO_DATA_FOUND then
    exit;
    end;
    if length(l_lastLine) > 0 then
    for i in 1 .. l_cnt-1
    LOOP
    dbms_sql.bind_variable( l_theCursor, ‘:b’||i,
    ltrim(rtrim(rtrim(
    regexp_substr(l_lastLine,’([^|]*)(\||$)’,1,i),p_delimiter),p_optional_enclosed),p_optional_enclosed));
    end loop;
    begin
    l_status := dbms_sql.execute(l_theCursor);
    l_rowCount := l_rowCount + 1;
    exception
    when OTHERS then
    L_ERRMSG := SQLERRM;
    insert into BADLOG ( TABLE_NAME, ERRM, data, ERROR_DATE )
    values ( P_TABLE,l_errmsg, l_lastLine ,systimestamp );
    end;
    end if;
    end loop;
    dbms_sql.close_cursor(l_theCursor);
    utl_file.fclose( l_input );
    commit;
    end if;
    insert into IMPORT_HIST (FILENAME,TABLE_NAME,NUM_OF_REC,IMPORT_DATE)
    values ( P_FILENAME, P_TABLE,l_rowCount,sysdate );
    UTL_FILE.FRENAME(
    P_DIR,
    P_FILENAME,
    P_DIR,
    REPLACE(P_FILENAME,
    ‘.txt’,
    ‘_’ || TO_CHAR(SYSDATE, ‘DD_MON_RRRR_HH24_MI_SS_AM’) || ‘.txt’
    commit;
    RETURN L_ROWCOUNT;
    end TABLE_LOAD;
    Note: when you run the function then it will also modify the source flat file with timestamp , so that we can have the track like which file was loaded .
    3) Check if the user is having UTL_FILE privileges or not :
    SQL> SELECT OWNER,
    OBJECT_TYPE
    FROM ALL_OBJECTS
    WHERE OBJECT_NAME = ‘UTL_FILE’
    AND OWNER =<>;
    If the user is not having the privileges then grant “UTL_FILE” to user from SYS user:
    SQL> GRANT EXECUTE ON UTL_FILE TO <>;
    4) In the function I have used two tables like:
    import_hist table and badlog table to track the history of the load and another to check the bad log if it occurs while doing the load .
    Under the same user create an error log table to log the error out records while doing the import:
    SQL> CREATE TABLE badlog
    errm VARCHAR2(4000),
    data VARCHAR2(4000) ,
    error_date TIMESTAMP
    Under the same user create Load history table to log the details of the file and tables that are imported with a track of records loaded:
    SQL> create table IMPORT_HIST
    FILENAME varchar2(200),
    TABLE_NAME varchar2(200),
    NUM_OF_REC number,
    IMPORT_DATE DATE
    5) Finally run the PLSQL block and check if it is loading properly or not if not then check the badlog:
    Execute the PLSQL block to import the data from the USER:
    SQL> declare
    P_TABLE varchar2(200):=<>;
    P_DIR varchar2(200):=<>;
    P_FILENAME VARCHAR2(200):=<>;
    v_Return NUMBER;
    BEGIN
    v_Return := TABLE_LOAD(
    P_TABLE => P_TABLE,
    P_DIR => P_DIR,
    P_FILENAME => P_FILENAME,
    P_IGNORE_HEADERLINES => P_IGNORE_HEADERLINES,
    P_DELIMITER => P_DELIMITER,
    P_OPTIONAL_ENCLOSED => P_OPTIONAL_ENCLOSED
    DBMS_OUTPUT.PUT_LINE(‘v_Return = ‘ || v_Return);
    end;
    6) Once the PLSQL block is been executed then check for any error log table and also the target table if the records are been successfully imported or not.

  • Create and insert into temporary table

    Dear all,
    I want to create an temporary table and insert data from select statement and order data by field in that table, at the end i want to drop temporary table.
    CURSOR rob_twin
    IS
    SELECT t.tarj, s.b24, date, status, fii, acnt, mbr, pviv, type
    FROM
    p6.tarj t
    p6.stb24 s
    p6.cuet c
    WHERE .......
    --now I want to create table and insert above data (from cursor rob_twin)
    --after that I need to order data by t.tary from new table
    --finally I want to drop this table
    Thank you for your help.
    Regards,
    Robert

    The point is in Oracle you do not create the temporary table at run-time, use it, and drop it again.
    But you can create a GTT (Global Temporary Table) once and then it stays in the data dictionary, just like a normal table. The "temporary" part is simply that the data is temporary, can only be seen in this one session, and will go away either on commit or when the session ends.
    So first you create a global temporary table with the columns you wish. Using either ON COMMIT DELETE ROWS or ON COMMIT PRESERVE ROWS you decide whether data in this GTT should survive across transactions or not.
    Your logic could then be to populate this GTT with data from your remote database using INSERT INTO gtt_table SELECT ... FROM ...@dblink
    Then work with that data in the GTT as you would with any normal local table
    And finally either you simply commit your transaction and the data in the GTT goes away (if you did ON COMMIT DELETE ROWS), or you just DELETE gtt_table.
    You do not continually create and drop a GTT. The table definition is permanent - it is only the data that is temporary.
    Edit:
    PS: As Karthick stated above - for almost any usual purposes it is likely to be possible to solve the problem without having to use GTT's. Usually even with db_links it can be done with suitable SQL and joins without having to use a GTT. But if that turns out to be one of those rare occasions where that is hard - then the above is the way to go ;-)
    Edited by: Kim Berg Hansen on Sep 19, 2011 1:38 PM

  • Migrating NULL values in tables from oracle to MS SQL

    Hi,
    I am migrating Oracle 11g database to MS SQL server 2014 using SSMA.
    Currently, when I migrate data, all (null) values in oracle tables are migrated as NULL to SQL.
    However, I want to migrate null values in oracle tables to blank space in SQL.
    Is it possible?
    Is there any setting in SSMA which supports this?
    Thanks.

    Hi ManiC24m,
    In SSMA, there is no setting we can modify to migrate null values in Oracle tables to blank space in SQL  Server. As Prashanth’s post, after the migration, you can replace the null values with blank space via the following Transact-SQL statements in
    SQL Server.
    USE <DatabaseName>
    Go
    UPDATE <TableName> SET <ColumnName>=''
    WHERE <ColumnName> IS NULL
    Thanks,
    Lydia Zhang

  • Migrating data from Oracle 9i to SQL Server 2005

    I am new to both. I need to first migrate data from oracle to sql server. After this I need to create a daily nightly batch process to insert new records from oracle to sql server into that table.
    As my knowledge in SQL server is zero. Can somebody help me how I can accomplish this.
    Somebody told me that I can use sql server import/export to do initial data dump into sql server and after that I can create a link in in oracle to do new iserts for new records. does any one have some example on this. I will really apprecite this if someone can give me step by step example. Thanks

    I have been to SQL Server training, but my SQL server databases are off the shelf system, so I don't have to muck with them. Anyway, Sql Server is just MS Access on steroids, so some of the same concepts apply. You need to create an external table links to oracle. The following tidbits I found by googling might help you.
    http://www.sqlmag.com/Article/ArticleID/22264/sql_server_22264.html
    http://www.lazydba.com/sql/1__152.html
    http://www.sswug.org/see/35034
    http://decipherinfosys.wordpress.com/2007/07/16/linked-servers-in-sql-server/
    Some of the above require subscriptions (free and or paid). Hope this helps.

  • SSIS - Script Task creates a DTS var and using Foreach loop, Execute SQL needs to INSERT into table from this DTS var.

    I have a script task written in C# that creates an array of strings "arrayFields" after parsing a text file. It saves the array of strings in a DTS variable.
    Each row in array represents a row is comma separated and is a row that must be inserted into a table. For example,
    X and Z are fields in the table
    X1, X2,....Xn
    Z1,Z2,...Zn
    I am using a Foreach Loop  to grab each row and then  Execute SQL Task to take each row from the array and insert each field per row in a table,
    The SQL is something like,
    INSERT dbo.table values(field1, field2,...fieldn) arrayFields?
    What should this this INSERT look like?

    I guess you implemented
    Shredding a Recordset
    Based on what I understood (correct me if I am wrong) you have difficulties mapping the input parameters, if so here is the guide
    http://www.sqlis.com/sqlis/post/The-Execute-SQL-Task.aspx
    In short it might look like
    INSERT dbo.table  (ColumnA, ColumnB,...) VALUES (?,?...)
    The syntax for the T-SQL INSERT is http://technet.microsoft.com/en-us/library/dd776381%28v=sql.105%29.aspx
    Arthur
    MyBlog
    Twitter

  • Reading  xml data from url and insert into table

    CREATE TABLE url_tab2
    URL_NAME VARCHAR2(100),
    URL SYS.URIType
    INSERT INTO url_tab2 VALUES
    (’This is a test URL’,
    sys.UriFactory.getUri(’http://www.domain.com/test.xml’)
    it is giving error as invalid character

    Check if your single quotes are the correct single quotes.
    The principle works as advertised in the XMLDB Developers Guide...
    C:\>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Tue Nov 25 21:44:46 2008
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create user OTN identified by OTN account unlock;
    User created.
    SQL> grant dba, xdbadmin to OTN;
    Grant succeeded.
    SQL> conn OTN/OTN
    Connected.
    SQL> CREATE TABLE uri_tab (docUrl SYS.URIType, docName VARCHAR2(200));
    Table created.
    SQL> -- Method SYS.URIFACTORY.getURI() with absolute URIs
    SQL> -- Insert an HTTPUri with absolute URL into SYS.URIType using URIFACTORY.
    SQL> -- The target is Oracle home page.
    SQL> INSERT INTO uri_tab VALUES
      2  (SYS.URIFACTORY.getURI('http://www.oracle.com'), 'AbsURL');
    1 row created.
    SQL> -- Insert an HTTPUri with relative URL using constructor SYS.HTTPURIType.
    SQL> -- Note the absence of prefix http://. The target is the same.
    SQL> INSERT INTO uri_tab VALUES (SYS.HTTPURIType('www.oracle.com'), 'RelURL');
    1 row created.
    SQL> -- Insert a DBUri that targets employee data from database table hr.employees.
    SQL>
    SQL> INSERT INTO uri_tab VALUES
      2  (SYS.URIFACTORY.getURI('/oradb/HR/EMPLOYEES/ROW[EMPLOYEE_ID=200]'), 'Emp200');
    1 row created.
    SQL> SELECT e.docUrl.getCLOB(), docName FROM uri_tab e;
    E.DOCURL.GETCLOB()
    DOCNAME
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    <head>
    AbsURL
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    E.DOCURL.GETCLOB()
    DOCNAME
    <head>
    RelURL
    <?xml version="1.0"?>
    <ROW>
      <EMPLOYEE_ID>200</EMPLOYEE_ID>
      <FIRST_NAME>Jenn
    Emp200
    SQL> set long 1000
    SQL> select HTTPURITYPE('www.oracle.com').getCLob() from dual;
    HTTPURITYPE('WWW.ORACLE.COM').GETCLOB()
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
    ">
    <html>
    <head>
    <title>Oracle 11g, Siebel, PeopleSoft |
    Oracle, The World's Largest Enterprise S
    oftware Company</title>
    <meta name="title" content="Enterprise Applications | D
    atabase | Fusion Middleware | Applicatio
    ns Unlimited | Business | Oracle, The Wo
    rld's Largest Enterprise Software CompanEdited by: Marco Gralike on Nov 25, 2008 10:13 PM

  • Procedure with multiple Loops and Insert into table

    Hello All,
    I am trying to create the Procedure to create a new table for our DWH.
    In this Case, I have 2 tables and I need to create Loop for each value from one table and get the respective data from second table based on first table data.
    Please find the below example:
    First table: TABLE_A
    X             Y              Z
    1              a              10
    1              b             abc
    1              c              xy
    1              e             $
    2              a              11
    2              c              asf
    2              d             tal
    2              f              ghs
    Second Table: TABLE_B
    A             B             C             D             E              F
    10           abc         xy           sd           ew          100
    10           jhy          xy           sd           ew          100
    11           ght         asf          tal           ss            ghs
    11           ght         afr          tal           ss            ghs
    O/P Table from Procedure: OUTPUT_TABLE
    A             B             C             D             E              F              X
    10           abc         xy           sd           ew          100         1
    11           ght         asf          tal           ss            ghs         2
    Business Logic In the Procedure:
    CREATE OR REPLACE PROCEDURE OP_TAB_PROCEDURE IS
    BEGIN
                    -- First get the DISTINCT values from the TABLE_A to generate the Loop
                    FOR ID (SEELCT DISTINCT X FROM TABLE_A_
                    LOOP
                                    -- For Each ID get the Y ,Z values from TABLE_A other than $ in Z
                                                    TEMP:
                                                    SELECT Y, Z FROM TABLE_A WHERE X = ID.X AND Z <> '$' ;
                                                    Based on above SELECT statement, I need to construct dynamic SQL query to get the data from TABLE_B
                                                    OP_EACH_ID:
                                                    SELECT * , ID.X AS X FROM TABLE_A WHERE [In this place I need generate sql cond dynamically. For Example, For X=1 in TABLE_A , the where cond must A=10 AND B='abc' AND C='xy'
                                                                                                                                                                                                                     For X=2 , the Where cond must be WHERE A=11 AND C='asf' AND D='tal' AND F='ghs']
                                                    -- I need to INSERT all the values from OP_EACH_ID into OUT_PUT_TABLE
                    END LOOP ;
    END;
    I am new to PL/SQL , so please help me on the above case.

    duplicate post

  • Could anyone tell me how to read 4 lines altogether and insert into table

    Hi ,
    I want to load the below data into table by using sql loader.
    First 4 lines should insert in one single row in table and again it should from '01' load the next 4 lines in another row.
    01suresh
    02works
    03in
    04bankok
    01kumar
    02works
    03in
    04abudabi
    01Raju
    02works
    03in
    04france
    Could you please give me some suggestion how i can accomplish it.
    Thanks in advance.
    Regards,
    Vino

    user1142030 wrote:
    First 4 lines should insert in one single row in table and again it should from '01' load the next 4 lines in another row.Not a problem, use CONTINUEIF. Control file:
    LOAD DATA
    INFILE *
    REPLACE
    CONTINUEIF NEXT PRESERVE(1:2) != "01"
    INTO TABLE continueif
    TRAILING NULLCOLS
    DUMMY FILLER POSITION(1:2),
    COL1 TERMINATED BY '02',
    COL2 TERMINATED BY '03',
    COL3 TERMINATED BY '04',
    COL4 TERMINATED BY '01'
    BEGINDATA
    01suresh
    02works
    03in
    04bankok
    01kumar
    02works
    03in
    04abudabi
    01Raju
    02works
    03in
    04france Now:
    SQL> create table continueif(
      2                          col1 varchar2(10),
      3                          col2 varchar2(10),
      4                          col3 varchar2(10),
      5                          col4 varchar2(10)
      6                         )
      7  /
    Table created.
    SQL> host sqlldr scott@orcl/tiger control=c:\temp\continueif.ctl log=c:\temp\continueif.log
    SQL> select * from continueif
      2  /
    COL1       COL2       COL3       COL4
    suresh     works      in         bankok
    kumar      works      in         abudabi
    Raju       works      in         france
    3 rows selected.
    SQL> SY.

  • Insert into MSSQL from Oracle

    Hello together,
    I'm a little bit frustrated. The follwoing is my problem:
    I want to insert some values from an Oracle 10gR2 database into a MSSQL database (SQL Server 2008 R2).
    Therefor I'm using DG4ODBC 11.2.0.3. The connection is working absolutly fine.
    I want to insert five values from five columns from oracle.table-a into a msssql table-b.
    But I'm hitting the error:
    Invalid character value for cast specification.
    Two columns from the oracle table are chars size 12 and 40, and three are number size 5.1, 5.1 and 4.
    The MSSQL column definitions are varchar40, varchar50, 2x float8 and int.
    The column assignments are:
    Oralce -> MSSQL
    a. char 12 -> varchar40
    b. char 40 -> varchar50
    c. number 5.1 -> float8
    d. number 5.1 -> float8
    e. number 4 -> int4
    The insert works greate for a,b and e but nor for c and d.
    I tried so many solutions (cast, to_binary_float, nls_character_format, nls_theritpory etc..) but nothing helps.
    I always hitting this error.
    Can anyone help me with this problem?
    cheers
    Joe

    Hi together,
    I fixed the problem. I multiply the origin number with 10. The result is a number without any comma. During the insert into MSSql I divide by 10.
    I now, this is a very strange solution but it works.
    Yes I know this helps only, because the column can only save number with one decimal place. For higher decimal places you have to multiple it with 100 or 1000 or......
    Hope this helps also other peoples.
    kind regards
    Joe

  • How to insert into table from an Datatable ?

    Hi Friend,
    I have a datatable that is created at some point in my SSIS as an object.
    I need to insert the data into a sql table, how should I do that ?
    I have this:
            Dim oleDA As New OleDbDataAdapter
            Dim dt As New DataTable
            Dim col As DataColumn
            Dim row As DataRow
            Dim sMsg As String
            oleDA.Fill(dt, Dts.Variables("history").Value
    and want to insert into a table in a SQL DB
            Dim sqlCon As New SqlClient.SqlConnection("server=Myserver\SQL2008R2;database=MyDB;Integrated Security=SSPI")
            Dim sqlreader As SqlClient.SqlDataReader
            sqlCon.Open()
    Thanks in advance,
    Pat
    Patrick Alexander

    Convert it to a ADO .Net recordset and store it in a object variable in SSIS.
    Then you can use it to populate the table using foreach loop with ado enumerator
    http://www.codeproject.com/Articles/10503/Simplest-code-to-convert-an-ADO-NET-DataTable-to-a
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

Maybe you are looking for

  • Using ale u can send from sap to sap and sap to non sap systems

    hi, using ale u can send from sap to sap and sap to non sap systems, then what is diff b/w ALE and EDI

  • Looking for an app similar to TetherGPS

    TetherGPS an app available in Android Market allows to grab GPS connection in Android Tablet. The app is installed in Android tablet as well as in Android phone. The phone acts as a server waiting for a client and the Android tablet connects to Andro

  • Crash furing Garageband3 Export to iTunes

    I wanted to export a track to itunes from GB3. My itunes resides on external drive. When given the command to do so, GB3 displayed itunes as if it had never run. It cleared my whole list. (The files survived.) I then copied them to the "new " itunes,

  • Stretching Panel Splitters

    Hi, I have a template in which I have placed many facet references. I use this template as the base for all my pages. I have the layout set up in which I have a facet ref for a left side navigator, a top menu area, and a place for the individual cont

  • Error when adding csv file to sharepoint doc library

    HELLO, I have an issue when adding file csv to doc library and i didint understand why private bool backUPDailyLogs(SPWeb web) try StringBuilder strCSV = GetStatistiques(web); SPFolder myLibrary = web.Folders[ListNames.LogLibrary]; string fileName =