Writing to a temp table in a stored procedure with dynamic sql

Hi
I am writing into a temp table with dynamic sql:
select coloum_name into #temp_table from
+
@DestinationDBName+'.information_schema.tables
and then I am trying to use #temp_table in the procedure:
select coloum_name into #anotherTable from #temp_table
but I am getting an error that #temp_table is not recognized.
Can a temp table not be used in dynamic sql ?
How can I overcome this problem ?

Temp Table Can used easily in Dynamic Query in SQL Server and here is small Exmaple you can check it and do like it 
CREATE PROC test
AS
BEGIN
CREATE TABLE #T1 
(ID  int , NAME Nvarchar(50))
CREATE TABLE #T2 
(ID  int , NAME Nvarchar(50))
DECLARE @SQL NVARCHAR(MAX)='Insert into #T1 
SELECT database_id , Name FROM Sys.Databases
Insert into #T2 Select ID , Name from  #T1 '
EXEC SP_ExecuteSQL @SQL
SELECT * FROM #T2
DROP TABLE #T1
DROP TABLE #T2
END
Exec Test
If you found My reply is helpful for you please vote me 
thanks
Mustafa EL-Masry
Principle Database Administrator & DB Analyst
SQL Server MCTS-MCITP
M| +966 54 399 0968
MostafaElmasry.Wordpress.Com

Similar Messages

  • SSRS - Stored procedure with Dynamic SQL Query

    Am calling stored procedure in SSRS report.  I have used Dynamic SQL query in stored procedure as I don't know the column name and column count.  And I have used like below at end of the stored procedure "select * from ##temptable".
    As I have used dynamic column, am not able to create report with this stored procedure.  Can someone help me out to resolve this issue.
    It will be highly appreciated if I get help. 
    Thanks

    I have tried everything.  But nothing has worked out. 
    If I get solution for below issue, it would be highly appreciated.
    "An error occurred during local report processing.
    The definition of the repport 'Main Report' is invalid.
    The report defintion is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition' which cannot be upgraded.
    Thanks
    Hello,
    I would suggest you post the complete error message to us for further investigation, if you preview the report before you deploy you may get a more detailed error that will help diagnose the source of the problem.
    This issue is more related to SQL Server Reporting Services, it's more appropriate to discuss it in the forum below:
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlreportingservices
    Don't forget to elaborate your issue with more detail.
    For the manual column, it might be the calculated field in SSRS. Here is the article for your reference, please see:
    http://technet.microsoft.com/en-us/library/dd239322(v=sql.110).aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • Convert a trigger format into a  stored procedure using Dynamic Sql

    Hi everyone,
    ihave table
    Table_NAME_ABCD contains
    i have a trigger Table_NAME_ID,ROW_CREATED_DATE,ROW_CREATED_BY,ROW_CHANGED_DATE,ROW_CHANGED_BY,UNQ columns
    i am populating Table_NAME_ID(primary_key) using sequencer in the below mentioned trigger.
    and for this table i have created IU trigger for inserting or updating trigger will fire
    create or replace
    TRIGGER "Table_NAME_IU_TRG" BEFORE INSERT OR UPDATE ON Table_NAME_ABCD FOR EACH ROW
    BEGIN
    If inserting then
    If :new.Table_NAME_ID is NULL THEN
    SELECT Table_NAME_ID_ABCD_SEQ.NEXTVAL INTO :NEW.Table_NAME_ID FROM DUAL;
    end if;
    if :new.ROW_CREATED_DATE is NULL then
    :new.ROW_CREATED_DATE := SYSDATE;
    end if;
    if :new.ROW_CREATED_BY is NULL then
    :new.ROW_CREATED_BY := USER;
    end if;
    if :new.ROW_CHANGED_DATE is NULL then
    :new.ROW_CHANGED_DATE := SYSDATE;
    end if;
    if :new.ROW_CHANGED_BY is NULL then
    :new.ROW_CHANGED_BY := USER;
    end if;
    if :new.UNQ is NULL then
    :new.UNQ := SYS_GUID():
    end if;
    end if;
    If updating then
    :new.ROW_CHANGED_DATE := SYSDATE;
    :new.ROW_CHANGED_BY := USER;
    end if;
    END;
    above mentioned table along with trigger is same format for ~100 different tables i have been created.
    i want a stored procedure in side it above mentioned trigger (i.e., for inserting or updating )code should be written with Dynamic Sql so that when ever i am passing Tablename as a parameter it should work.
    please suggest me.

    What is new since this thread?
    Stored procedure instead of Trigger

  • Two temp tables in a Stored Procedure

    Hi guys,
    Is it feasable to use two stored procedures and form joins between them within a single stored procedure. I am trying a workaround for cursors in SYBASE.
    Thanks,
    Developer

    This Create a temporary table in stored proc is a long and occasionally fractious discussion of the differences between temp tables in Oracle and MS SQL Server (and hence Sybase). You may wish to review it, or at least the links to the documentation.
    Alternatively, expalin what it is the sybase code is doing and we will tell the best way to implement it in Oracle.
    Cheers, APC

  • A temp table in a stored procedure , set a value to varchar(MAX)

    Hi ,,
    In stored procedure there is  a temp table and set a value to varchar(MAX) . What exactly is the different between setting it to varchar (MAX) instead of  varchar(n)
    Thank You
    Jeevan Vinay

    Vinay,
    Spend some time online to read and search about your problem before blindly posting it on forum, if you would have done that you could have found out eaisly below two links which will explain you in deep
    http://stackoverflow.com/questions/3682821/difference-between-varchar500-vs-varcharmax-in-sql-server
    http://sqlhints.com/2013/03/10/difference-between-sql-server-varchar-and-varcharmax-data-type/
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • MySQL temp tables or Calling Stored procedures in CS4

    I need to filter a result set by username before performing a LEFT JOIN and including OR IS NULL rows. The SQL works from from the mysqli client, by either creating a temp table using  "create temporary table temp_appts select * from..."  Or by creating a stored procedure which contains the same "create temp table" statement, then running my LEFT JOIN statement against the temp table.
    I have tried both in CS4, it accepts the code in "code view" without errors but the page in a browser loads as a blank or a 500 error in IE. In my experience, this is caused by exiting before reaching the html header.
    Is it possible to do either in CS4?  Below is the code I am using.
    $varU_temp_appts = "-1";
    if (isset(<?php $_SESSION['MM_Username'])){
    $varU_temp_appts =$_SESSION['MM_Username'];
    mysql_select_db($database_ess, $ess);
    $query_temp_appts = sprintf("CREATE TEMPORARY TABLE temp_appts SELECT * FROM appts WHERE username=%s", /GetSQLValueString($varU_temp_appts, "text"));
    $temp_appts = mysql_query($query_temp_appts, $ess) or die(mysql_error());
    $row_temp_appts = mysql_fetch_assoc($temp_appts);
    $totalRows_temp_appts = mysql_num_rows($temp_appts);
    mysql_select_db($database_ess, $ess);
    $query_todays_appts = "SELECT *  FROM appt_tm LEFT JOIN (temp_appts) ON appt_tm.appt_time=temp_appts.appt_hr WHERE(appt_date=CURDATE() OR appt_date IS NULL)";
    $todays_appts = mysql_query($query_todays_appts, $ess) or die(mysql_error());
    $row_todays_appts = mysql_fetch_assoc($todays_appts);
    $totalRows_todays_appts = mysql_num_rows($todays_appts);
    Any help is appreciated!

    chuck8 wrote:
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'appt_tm LEFT JOIN (temp_appts) ON appt_tm.appt_time=temp_appts.appt_hr where tem' at line 1
    I'm no expert on joins, but I know there were changes in MySQL 5.0.12 that resulted in queries that had previously worked failing. Go to http://dev.mysql.com/doc/refman/5.0/en/join.html, and scroll down to the section labelled Join Processing Changes in MySQL 5.0.12.

  • Temp Table within an Stored Procedure

    I'm pretty new to Oracle, but I have been developing in MS SQL for about 15. So I'm still getting use to the syntax and features within Oracle.
    I'm trying to create a stored procedure that has two temporary tables within it, and then queries both them tables and inserts the results into a table.
    I created the script but when they try to run in on the server it wont run. Can you guys tell me what I'm doing wrong?
    CREATE OR REPLACE PROCEDURE UpdateFIDB_SP IS BEGIN               CREATE GLOBAL TEMPORARY TABLE myAAAA         AS               (SELECT  AAAA.1111, AAAA.2222, BBBB.3333_EXT, CCCC.4444, DDDD.5555, DDDD.6666, DDDD.7777,                       DDDD.8888, AAAA.9999, EEEE.1010, EEEE.1A1A, EEEE.1B1B, FFFF.3333_LO, FFFF.1C1C,                       AAAA.1D1D               FROM mySchema.FFFF_07 FFFF               RIGHT OUTER JOIN mySchema.EEEE EEEE ON FFFF.9999 = EEEE.1B1B               RIGHT OUTER JOIN (                                 mySchema.DDDD DDDD                                 RIGHT OUTER JOIN mySchema.AAAA AAAA ON DDDD.1D1D = AAAA.1D1D                                 ) ON EEEE.PSPNR = AAAA.9999               LEFT OUTER JOIN mySchema.CCCC CCCC ON AAAA.3333 = CCCC.3333               LEFT OUTER JOIN mySchema.BBBB BBBB ON AAAA.3333 = BBBB.3333_INT               GROUP BY  AAAA.1D1D, AAAA.1111, AAAA.2222, BBBB.3333_EXT, CCCC.4444, DDDD.5555, DDDD.6666,                         DDDD.7777, DDDD.8888, AAAA.9999, EEEE.1010, EEEE.1A1A, EEEE.1B1B, FFFF.3333_LO,                         FFFF.1C1C         ON COMMIT DELETE ROWS);                         CREATE GLOBAL TEMPORARY TABLE myGGGG         AS             (SELECT  GGGG.1E1E, GGGG.1F1F, GGGG.1G1G, GGGG.1H1H, GGGG.1I1I, GGGG.1J1J,                     GGGG.1K1K, GGGG.R1D1D, GGGG.1L1L, GGGG.1M1M, GGGG.1N1N, GGGG.1O1O, GGGG.1P1P,                     GGGG.1Q1Q, HHHH.1R1R, IIII.1S1S, IIII.1T1T, IIII.1U1U, IIII.1V1V             FROM  mySchema.IIII IIII                   INNER JOIN mySchema.GGGG GGGG ON IIII.1K1K = GGGG.1K1K                   LEFT OUTER JOIN mySchema.HHHH HHHH ON GGGG.1L1L = HHHH.1W1W             WHERE ( GGGG.1M1M IN ('20', '30') )             AND   ( TO_DATE(IIII.1V1V, 'dd-mon-yyyy') = TO_DATE('31-DEC-9999','dd-mon-yyyy') )             AND ( TO_DATE(GGGG.1N1N, 'dd-mon-yyyy') >= TO_DATE('01-Jan-2011','dd-mon-yyyy') )         ON COMMIT DELETE ROWS);                 TRUNCATE TABLE FIDB;                 INSERT INTO FIDB (1111, 2222, 3333_EXT, 4444, 5555, 6666, 7777, 8888, 9999,                                   1010, 1A1A, 1B1B,3333_LO, 1C1C, 1D1D, 1E1E, 1F1F, 1G1G,                                   1H1H, 1I1I, 1J1J, 1K1K, R1D1D, 1L1L, 1M1M, 1N1N,                                   1O1O, 1P1P, 1Q1Q, 1R1R, 1S1S, 1T1T, 1U1U, 1V1V)            SELECT  myAAAA.1111, myAAAA.2222, myAAAA.3333_EXT, myAAAA.4444, myAAAA.5555, myAAAA.6666,                 myAAAA.7777, myAAAA.8888, myAAAA.9999, myAAAA.1010, myAAAA.1A1A, myAAAA.1B1B,                 myAAAA.3333_LO, myAAAA.1C1C, myAAAA.1D1D, myGGGG.1E1E, myGGGG.1F1F, myGGGG.1G1G,                 myGGGG.1H1H, myGGGG.1I1I, myGGGG.1J1J, myGGGG.1K1K, myGGGG.R1D1D,                 myGGGG.1L1L, myGGGG.1M1M, myGGGG.1N1N, myGGGG.1O1O, myGGGG.1P1P,                 myGGGG.1Q1Q, myGGGG.1R1R, myGGGG.1S1S, myGGGG.1T1T, myGGGG.1U1U, myGGGG.1V1V         FROM myGGGG INNER JOIN myAAAA ON myGGGG.R1D1D = myAAAA.1D1D         ORDER BY myGGGG.R1D1D;        COMMIT;     END;
    Thanks!

    Some people still sound mad at me because I have two queries and use temp tables
    Because in Oracle, unlike in sql server, you generally do not NEED temp tables at all.
    One of the biggest mistakes new Oracle developers make is to use PL/SQL when SQL will do the job just fine. Using PL/SQL when it isn't needed generally makes the code slower, less scalable and harder to maintain.
    One of the biggest mistakes sql server developers make when they use Oracle is to use temp table when they aren't needed. They try to write code in Oracle exactly the same way they wrote it in sql server. That creates temp tables that aren't needed, makes their code perform horribly and also makes it less scalable and harder to maintain.
    Oracle works differently and generally doesn't need ANY temp tables. You need to learn about how Oracle handles transactions and read consistency and how writers do NOT block readers and vice versa.
    Create a new thread and post FORMATTED code that shows the PROBLEM you are trying to solve and we can show you the proper way to solve it. That 'proper way' will likely NOT include any need for or use of temp tables.

  • Temp table scope within stored procedures

    Hi,
    I want to build a main sproc that will contain a temp table with policy records.  I then want to call a 2nd sproc from the main sproc, but i want to be able to use the temp table that was created in the main sproc within the 2nd sproc.
    Is this possible?  If so, is it better to use #temptable, ##temptable, or temptable variable?
    thanks
    Scott

    I then want to call a 2nd sproc from the main sproc, but i want to be able to use the temp table that was created in the main sproc within the 2nd sproc.
    Yes this is possible, you can use that temp table in other proc. I would go with #temptable.
    Sample:
    use master
    go
    create proc subproc
    as
    begin
    --temp table
    select 1 temptable into #t
    select * from #t
    --table variable
    declare @t table (tablevariable int)
    insert into @t values (1)
    select * from @t
    end
    go
    create proc mainproc
    as
    begin
    exec subproc
    end
    go
    --call the procedure
    exec mainproc
    --drop proc subproc
    --drop proc mainproc
    When to use temp table over table variable -
    here
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • Expose Stored Procedure with Dynamic Table Parameters

    Hi,
    I know Oracle 11g allows access via web service to all stored procedures.
    The basic idea of what we intend is to create groups of users.
    What I need, and I'm not sure if it's possible, is to expose a PLSQL that has the group's attributes and an xml:sequence of users that belong to that group. The procedure would be something like this:
    TYPE user IS RECORD (
      uid   NUMBER,
      name   VARCHAR2(100),
    TYPE users IS TABLE OF user INDEX BY BINARY_INTEGER;
    PROCEDURE add_group(g_name IN VARCHAR2(100), g_users IN users, ...) IS
    BEGIN
    END;
    The Procedure will be called from a BPEL Process as if it was a web service.
    Q:
    - Can this be done?
    - How will it map users?
    Thanks in advance :-)

    So, being as we don't have Oracle DB 11g that exposes WebServices natively to access the stored procedures, what would be the best way to access the stored procedure like a web service?
    What we are thinking of doing now is http://guidoschmutz.wordpress.com/2010/08/08/oracle-service-bus-11g-and-db-adapter-a-different-more-integrated-approach/
    Thanks again!

  • Problems while creating a Java stored proc with dynamic SQL

    Hi,
    I am trying to write a stored procedure which uses dynamic SQL. The code runs fine outside the database (on DOS PROMPT),but gives me an exception when I try to execute it as a procedure. Could somebody help me out?
    The exception given is:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.security.AccessControlException: the Permission (java.net.SocketPermission
    elcamino.mcasolutions.com resolve) has not been granted by
    dbms_java.grant_permission to SchemaProtectionDomain(SPO|PolicyTableProxy(SPO))
    Does it have anything to access permissions to that user?
    Thanks in advance!
    Joe

    Hi:
    This store procedure is a Java stored procedure (JSP)?
    If true, change your Java code to connect to database because you are connected.
    For example:
    Connection con = new OracleDriver().defaultConnection();
    instead of
    Connection con = DriverManager.getConnection(..);
    Bye.
    J.

  • Can I call stored procedure with PL/SQL?

    Oracle newbie question, it is.
    Assume a very simple stored procedure like this:
    Create or replace procedure aa (
    inPar IN number, outPar OUT number)
    IS
    rrr Number;
    Begin
    Blah, blah, blah...
    rrr := inPar + 100;
    Blah, blah, blah...
    outPar := rrr;
    End;
    So the questions are
    1) How do I call the above stored proc and pass input parameter values dynamically?
    2) How can I retreieve the results of outPar?
    I did some research and I learn I can use a programming interface such as Visual Basic or Java. Is that the only way available? I know a small bit about SQL*Plus. f I've tried to enter some PL/SQL commands under SQL*PLUS but I'm stuck. I must have missed something..please.
    In MS SQL Server environment I know what I can do. If I want to do the same thing, I just:
    Create proc aa ( @inParam int, @outParam int OUTPUT )
    as
    blah, blah, blah
    Set @outParam = @inParam + 1000
    return 1
    GO
    Enter the following statements (via query analyzer) to call the SQL Server Stored procedure and get the result:
    Declare @outX int
    Declare @returnX int
    exec @returnX = aa 100, @outX OUTPUT
    print str(@outX)
    print str(@returnX)
    Go

    maybe this example might be of some help:
    SQL> set linesize 120
    SQL> set pagesize 40
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975       1000         20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7788 SCOTT      ANALYST         7566 09-DEC-82       3000                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 12-JAN-83       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL> create or replace procedure proc_get_emp_name(pEmpno in number,
      2                                                pEmpName out varchar2) as
      3  begin
      4    select ename
      5      into pEmpName
      6      from emp
      7     where empno = pEmpno;
      8  end;
      9  /
    Procedure created.
    SQL> declare
      2    vEname     emp.ename%type;
      3  begin
      4    for i in (select empno from emp) loop
      5      proc_get_emp_name(i.empno,vEname);
      6      dbms_output.put_line(vEname);
      7    end loop;
      8  end;
      9  /
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    PL/SQL procedure successfully completed.
    SQL>

  • How do I submit to stored procedure with dynamic number of controls on page

    I need to submit to a stored procedure from a dynamic page that has a variable number of controls. In the past I have always had a procedure that took 1 input parameter for each control. Now I will not know how many controls are on the form.
    Is it possible to submit some type of parameter array?
    Thanks,

    Hi,
    To declare a bind variable in SQL*Plus, use the SQL*Plus VARIABLE command with a data type:
    SQL> VARIABLE  n   NUMBEROr you could change your code so that it uses the local variable n instead of the bind variable by removing the ":"
    DECLARE
        v_new_jobno BINARY_INTEGER;
        n number;
    BEGIN
        DBMS_JOB.SUBMIT (n
            ,job => v_new_jobno
            ,what => 'spMyTest(null,null,n);'
            ,next_date => sysdate
            ,interval => 'sysdate + 1');
        commit;
    END;
    /

  • Stored Procedures and Dynamic SQL

    In order to return query results from a PL/SQL procedure, I currently use an IN OUT parameter to return a cursor to JDBC.
    (Q: Is there any other way ???)
    But if I want to use dynamic SQL (DBMS_SQL) within the procedure, I don't know how to return the results. How do I get a handle on the DBMS_SQL underlying cursor, rather than just its cursor-ID?
    Can anyone help ?
    Thanks,
    Rob
    ([email protected])

    Very happy customer here!

  • Stored procedure with ejb3

    Hi all,
    I want to know: calling to stored procedure is support in EJB3?
    Specifically if it's possible to call one to return a sql query, like a ref cursor in Oracle Database or a stored procedure with a sql query insight in Microsoft Sql Server.
    Historically, our teachers say to us "put your logic nearest to the database, this is a good practice and preserve the data integrity". This concept caused many legacy systems currently have a layer of stored procedure; the only way of accessing data (like in may company).
    With arrive of Object to Relagtional Mapping APIs this concept it seems to go direct to the trash.... but, What happen with all of this legacy logic?. Can we use them?
    I've search on the Web but nothing I've found. Some APIs like Oracle TopLink have support to calling stored procedure. But nothing in EJB3.
    Well, I hope some help of your.
    Thanks!

    Well, may be my original question was badly raised.
    Being more precise I talk about the following thing:
    How to execute a stored procedure that returns the result of a SQL query (like a ref cursor in Oracle) and then to map this result to Java objects in JPA/EJB3?
    The Query interface allows to execute native SQL querys , but I have only been successful executing ordinary SQL querys (like SELECT * FROM Table).
    I wish some like this:
    --Stored procedure some like that
    CREATE STORED PROCEDURE GET_CUST_SP(AGE INT, CRESULT OUT REF CURSOR) IS
    BEGIN
    OPEN CURSOR CRESULT FOR;
    SELECT * FROM CUST_TAB WHERE CUS_AGE = AGE;
    END;
    /*The EJB Entity*/
    @NamedNativeQuery(
    name="getCust",
    query="GET_CUST_SP(:AGE )",
    resultsetMapping="myCustMapping")
    @SqlResultSetMapping(.....)
    @Entity
    public class Customer {
    Or may be in programmatic mode through Query interface...
    Well, thanks for your help.
    regards.

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

Maybe you are looking for

  • How to download a file under link in FF?

    there is a 'save target as...' popup menu option in "big" firefox, which I use to skip default action for specific files. I.e. to download a pdf file to read it later instead of open it in acroread right now. How can I get the same function in mobile

  • RFC with Multilevel Hierarchy call from Server Proxy

    Dear Experts, We would like to call BAPI inside a server proxy. PI has created an interface structure exactly identical as the BAPI structure, but while generating ABAP proxy, system has added additional controller structure for each hierarchy. Now o

  • IPhone 6 seems to use huge volume of other memory

    For eg. on my iPhone 6 with 16GB memory I see 958 MB for photos,  286 MB for apps, 54 MB for documents and data  & 10.5 GB of Other data.I keep deleting apps and the memory freed up gets gobbled up by other data in no time. The iPhone has become unus

  • Dependent comboboxes for search criterias

    Hi all, I have to build a web application where special filtered data should be displayed. Therefore BC4J and UIX should be used. The search criteria should be specified by the user in the header of the form by selecting available items of comboboxes

  • CS3 (PC) is very unstable, crashes constantly

    I'm having some maddening problems with CS3 on my work PC. Some days, the program is stable, opens files just fine, and acts like it should. But, some days, it takes 5 or 6 tries just to get Id to run; it crashes while starting up, and I get an error