MS SQL to Oracle Integration.

Hi,
I want to load data from MS SQL to Oracle using interface. Can anybody tell me what are the steps to do this using ODI tool ?
Which LKM,IKM I should use for this ?
Thanks in advance,
Shrinvas
Edited by: 878809 on Aug 25, 2011 12:39 AM

It depends on what you want to do and the size of the data you are moving from SQL (MySQL or MSSQL) to Oracle. But take a look at the variables "Array Fetch Size" and "Batch Update Size" in topology manager for both target and source data servers. These values makes ETL faster or slower.
If you want to do a truncate&load, you need to use SQL to Oracle Knowledge Modules which comes out of the box.
If you want a Incremental Update or Slowly Changing Dimensions mechanism you can load data to Oracle (with method upside) then write a second interface for the mechanism.
I had the same issue but I've written my own Knowledge Modules (without using any staging tables) that I call "SQL to Oracle directload" which loads data on-the-fly mode and it supports SCD and Incremental Update as well.
Cheers.

Similar Messages

  • About SQL and Oracle

    Hello, I was using a MySQL database and i will soon use Oracle8. I was wandering if Oracle authorize something like mysql_result... I'm looking too for simple documentation about connecting to an Oracle database from a php file using Sql. Do u know books or sites ? Tks

    user12317666 wrote:
    Does Oracle support T-SQL ? Why would Oracle support a proprietary macro-based language implementation from a competitor?
    If it is not supported in Oracle, what is the major grammer difference between T-SQL and Oracle supported SQL ? Oracle has two languages. SQL. PL/SQL.
    PL/SQL is formal declarative procedural language with object orientation programming features. It is based on the Ada language (close relative of the Pascal language).
    SQL is fully integrated with PL/SQL. Which means that you can write and mix SQL source code with PL/SQL source code and the PL/SQL compiler will figure out which is which and where to make calls to the SQL engine for executing SQL code.
    Is there any efficient way for programmer to complete T-SQL transition to Oracle SQL ? Yes. Unfortunately not the answer that you are likely hoping for.
    Forget EVERYTHING you did with T-SQL.
    There is no real comparison between the two. And not only many differences, but some fundamental and conceptual differences too.

  • Dblink creation between sql and oracle server

    Hi dears,
    I need to create dblink between the sql and oracle server.
    (For me the requirement is sql datas need to import in oracle database).
    My questions is,
    Without installting gateway is't possibale to get the sql data in the oracle server.
    my database version is 11.2.0.3 64bit
    Kindly let me know, Waiting for your suggestsion.
    Regards
    Athish

    About the Linked Server mechanism have a look at the MS Knowledge base article:
    Article ID: 280106 - HOW TO: Set Up and Troubleshoot a Linked Server to Oracle in SQL Server
    or
    How to run a SQL Server 2005 Integration Services package as a SQL Server Agent job step Article ID : 912911
    Regarding DG4ODBC and DG4MSQL, please have a look at our Support portal and look for the gateway master note:
    Master Note for Oracle Gateway Products          [Document 1083703.1]     
    It contains generic information how to connect to the foreign database
    Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    as well as the functional differences between the Database Gateway for ODBC (Generic Connectivity) and MS SQL Server
    Document 252364.1 Functional Differences Between Generic Connectivity and Database Gateways
    Document 232482.1 Gateway and Generic Connectivity Licensing Considerations
    as well as where to find the latest release and how to install and configure them.

  • Can we use Dynamic SQL in Oracle Reports ?

    Hi ,
    Can we use Dynamic SQL in Oracle Reports ?
    If yes please give some examples .
    Thanx
    srini

    I believe the built-in package SRW.Do_Sql is what you are looking for
    Example from the document:
    /* Suppose you want to create a "table of contents" by getting the
    ** first character of a columns value, and page number on which its
    ** field fires to print. Assume that you want to put the "table of
    contents"
    ** into a table named SHIP. You could write the following construct:
    DECLARE
    PAGE_NO NUMBER;
    PAGE_FOR INDEX NUMBER;
    SORT_CHAR CHAR(1);
    CMD_LINE CHAR(200);
    BEGIN
    SORT_CHAR := :SORT_NAME ;
    IF :CALLED = Y THEN
         SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
         SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
         P_START_PAGENO);
         SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
    END IF;
    SRW.GET_PAGE_NUM(PAGE_NO);
    CMD_LINE := INSERT INTO SHIP VALUES
                          (||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
    SRW.MESSAGE(2,CMD_LINE);
    SRW.DO_SQL(CMD_LINE);
    COMMIT;
    EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
            NULL;
      WHEN SRW.DO_SQL_FAILURE THEN
            SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
      WHEN OTHERS THEN
           COMMIT;
    END;

  • SQL Server Oracle If else differences

    I have a query in SQL Server 2008 that uses an if statement to determine how the SQL is returned. It is fairly complex but here it is in its basic form.
    declare @granularity varchar(20);
    begin
    set @granularity = 'Month';
    if (@granularity = 'Month')
    begin
    select count(*) as DisplayCount, yearstep, monthstep
    from MyTable
    group by yearstep, monthstep
    order by yearstep, monthstep
    end
    else
    if (@granularity = 'Year')
    begin
    select count(*) as DisplayCount, yearstep
    from MyTable
    group by yearstep
    order by yearstep
    end
    end
    Originally I thought the conversion would be as easy as changing the @ to :, adding a then and an end if. Not so....
    Can anyone show what the Oracle equivalent would be?
    Edited by: user497094 on Aug 20, 2010 12:51 PM

    If you use SQL Developer tool, you have a translator to translate T-SQL to Oracle PL/SQL language.
    For your example, you should get:
    BEGIN
    v_granularity := 'Month' ;
    IF ( v_granularity = 'Month' ) THEN
    BEGIN
    SELECT COUNT(*) DisplayCount,
    yearstep,
    monthstep
    FROM MyTable
    GROUP BY yearstep,monthstep
    ORDER BY yearstep,
    monthstep;
    END;
    ELSE
    IF ( v_granularity = 'Year' ) THEN
    BEGIN
    SELECT COUNT(*) DisplayCount,
    yearstep
    FROM MyTable
    GROUP BY yearstep
    ORDER BY yearstep;
    END;
    END IF;
    END IF;
    END;
    I hope it helps youi
    Regards,
    Mireille

  • Using a SQL for Oracle in Microsoft Excel Query

    I am having the most difficult time (in fact, I can't get it to work) trying to use an SQL I created in Toad for Oracle. It works fine in Toad for Oracle...gives me all the data I need. I am trying to use it in Excel for users that don't know SQL or Oracle so they can use the query to extract data they need for Charts, Graphs, etc.
    Here is the SQL code from Toad for Oracle:
    /* Formatted on 2006/09/22 11:42 (Formatter Plus v4.8.6) */
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )Can someone help me...maybe point out what I'm doing wrong.
    Note: I also tried creating this query in Microsoft Query (the simple way) and when I first create it...it works...But then if I go back in to edit the query, and refresh the query or try to Return data to Excel, it gives me a ORA-00936 error message.
    Why it works when I first create the query in Excel, I don't know. But I have to validate the queries I'm creating (SQL or not) and I can't validate it if every time I go into edit the query (which may have to happen; that's why I have to fix this before I can submit my validation).
    Anyway, any help would be greatly appreciated.

    Okay, I know I'm replying to my own threads here...but I want to add a little bit more information again.
    I was successful in figuring out that changing the :criteria to a ? worked.
    I tested this on 1 criteria at a time. Adding one more scenario ? at at time.
    It only worked up until about 3 scenarios of each criteria.
    Then when I refreshed the query in Microsoft Excel Query, I got an "out of memory" error, and then it ended up just erasing the SQL I had been using.
    Here's the SQL I had where it gave me this error. Am I possibly just making Excel work too hard? It just doesn't make sense because Toad for Oracle handled it in like 4 seconds. Which brings me back to an intial question I had. Can Excel use Toad for Oracle somehow?
    Here's the code:
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
    AND (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= ?
                 AND a_compl_summary.entry_date <= ?
            AND (   a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
            AND (a_compl_summary.region = ?)
            AND (   a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
            AND (a_compl_summary.complaint = ?)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
               ))

  • Oracle Integration Adapter for SAP R/3

    I am working with a customer implementing Oracle EBS Release 12.2.
    The customer has implemented SAP for financial modules and the oracle solution considers an EBS - SAP Integration for Receivables. Does anyone have any experience integrating Oracle EBS Receivables with SAP? Can you give us some guidance regarding EBS - SAP Integration best practices?
    We have found a paper regarding Oracle Integration Adapter for SAP R3. We would like to have some information about what are the Oracle products we can integrate with SAP using Oracle Integration Adapter for SAP R3.
    In case Oracle EBS can integrate with SAP using Oracle Integration Adapter, we would like to know if anyone has experience integrating Oracle EBS Receivables with SAP using Oracle Integration Adapter for SAP R3 for AR transactions and Receipts?
    Any help would be very much appreciated.

    Thank you veyr much Manoj for your reply. I just tried it now buit no fruits.
    I wonder if it can really be due to privileges given to my account, which allows to connect thru SAP Front-end but does not allow to connect by any other means. I can not think of any other possible reason.

  • SQL to Oracle Migraton - Unable to create source model in Migration Workben

    We are trying to use Oracle Migration Workbench utility to transfer data from SQL to Oracle. when we start creating the source model we get the following error :-
    failed to load source model ora-01401 inserted value too large for column.. this is the error at the ss2k_syslogins table. this is a logical model creation from sql server db.
    In case if this is a data issue with the syslogins table/view, is there any way to overcome this or whether we can do any settings at Workbench Level to overcome this..
    Thanks in advance,
    John.

    I think I figured it out.
    1 - I used the Migration Work Bench that came with the 9.2.0.1 client - BAD IDEA.
    2 - I down loaded the OMWB (10.x) - GOOD IDEA. I also downloaded the plugins so that the versions would match each other. Get rid of any existance of the 'old' OMWB directory under the OracleHome, so as not to get confused.
    3 - I realized that you just extract the OMWB.zip file to the C: drive like some third world DOS application, so it won't show up in under your start menu.**
    **I find this kinda cheesy that the Oracle installer is not involved here to add it to the Oracle Configuration and Migration menu in start up. I suppose you can copy the unzipped struture over top of the existing clint directory structure, but still dumb.
    3 - The other odd piece, you down load the plugin as a zip (and not a jar), BUT DON'T UNZIP IT!! Rather place it in the ..\plugins directory, underneath wherever you unzipped the OMWB, and RENAME IT with a .JAR extension (again don't unzip).
    4 - Make a shortcut on your desktop to the omwb.bat file (from where ever you unzipped the OMWB product)
    5 - Fire up that icon and the product will look at the new .JAR in the plugin folder and 'tada', you have OMWB with your specific database plugin available.
    The new product didn't hang for me. Now I just need to figure out how port this into a shema name OF MY CHOSING, and not the generic OMWB_Login1 that it created.
    I f anyone has info on that, let me know.... I think its in the destination creation (step two of the whole process).
    Jeff Ferrel - State of Nevada

  • Pl/sql in oracle reports 6.0

    Hi ,
    I am new to oracle reports, is there any way to use pl/sql in oracle reports.I mean i have to take aggregate data from Oracle and to print/populate the data according to slabs(Say distance slab or time slab).Can u please provide me sample code...
    mail id : [email protected]
    thanks & regards
    Anand M

    you can use ref cursor in your pl/sql stored procedure and then call it in your reports

  • How to convert epoch time to datetime in sql*loader Oracle

    Hello,
    I wan't to question how to convert epoch time to datetime in sql*loader Oracle. I try this script for convert epoch time to datetime in sql*loader, but error:
    Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    This is my loader:
    LOAD DATA INFILE 'C:\Documents and Settings\Administrator\My Documents\XL_EXTRACT_211\load.csv'
    into table TEMP_TEST_LANGY append
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    DATADATA CHAR "TO_DATE('01-JAN-1970','DD-MON-YYYY')+:datadata/86400"
    This is my csv file:
    79314313.7066667
    79314336.2933333
    79314214.3466667
    This is my table:
    CREATE TABLE TEMP_TEST_LANGY
    DATADATA DATE
    Thanks
    Edited by: xoops on Sep 21, 2011 8:56 AM
    Edited by: xoops on Sep 21, 2011 8:58 AM

    thanks for your answer, but I asked to use sql loader instead of the external table, which so my question is why can not the epochtime converted to datetime, if there is no way to convert a datetime epochtime using sql loader, so I'm required to use the external table. thank you.
    This is my error log:
    Column Name Position Len Term Encl Datatype
    DATADATA FIRST * , CHARACTER
    SQL string for column : "TO_DATE('1-Jan-1970 00:00:00','dd-MM-YYYY hh24:mi:ss') + (:DATADATA/60/60/24)"
    Record 1: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 2: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Record 3: Rejected - Error on table TEMP_TEST_LANGY, column DATADATA.
    ORA-01722: invalid number
    Edited by: xoops on Sep 21, 2011 12:33 PM

  • How to access MS SQL in Oracle BI Administration?

    Hi All,
    I'm a new in Oracle BI, I've just created an business application using Oracle BI Administration Tool of Oracle BI Server version 10.1.3.4.1:
    Steps:
    1. building repository (through Physical, Business model and Mapping, Presentation),
    2. making Answers from Presentation Services.
    => It ran well and beautiful reports, charts. But now, my DB is stored in Microsoft SQL Server, help me how to access MS SQL in Oracle BI, more details steps, are there any useful links?
    Appreciate All.

    Hi
    Do the following
    Control panel> Administration tool> ODBC>SystemDSN > ADD > select the driver>Your SQL SERVER credentials
    Then test the connection
    Go to the BI tool
    IMPORT from Database>Select the SQL server connection you have just created>Locate your desired schema> configure the connection pool> import
    regards
    Roy

  • How to validate XML Digital Signature with XML DB (o PL/SQL) in Oracle 11g

    Hi,
    Do you know if there is possibility to validate XML Digital Signature using XML DB (or PL/SQL) in Oracle 11g?
    Let say I have CLOB/XMLType containing Digitally Signed XML, and I want to validate, that thsi is proper signature. I also have public key of signer (I could store it in CLOB or file or Oracle wallet).
    Is it possible to do?
    If there is need to install additional component - then which one?
    Regards,
    Paweł

    Hi,
    this is what i got from someone...
    but the links he gave are not opening up...
    u have to place a picture there and have to load the digital signatures as Jpegs on to the server to OA top
    and have to refer them in the XML for dynamically get the signature on the reports
    when u select the properties of the picture placed in the XML template,
    there will be one tab with "URL"... in that u have to give the path for that jpegs
    Pls refer the following documents for enabling digital signature on pdf documents.
    http://iasdocs.us.oracle.com/iasdl/bi_ee/doc/bi.1013/e12187/T421739T481159.htm#5013638    (refer section 'Adding or Designating a Field for Digital Signature'
    http://iasdocs.us.oracle.com/iasdl/bi_ee/doc/bi.1013/e12188/T421739T475591.htm#5013688
    (Implementing a Digital Signature
    Is the BI Publisher installed on your instance of version 10.1.3.4 or higher?
    Pls procure a digital signature as soon as possible. The process can take time. OR we could use any certificate that you already might have OR generate a certificate using Oracle Certificate Authority for demo.

  • Oracle.integration.platform.blocks.sdox.WLSSDODynamicStubHelper

    Hi All,
    I have developed an ADF-BC Service and created service interface in it. And trying to deploy in Admin server but getting the following error:
    [01:44:28 PM] Weblogic Server Exception: weblogic.application.WrappedDeploymentException: oracle.integration.platform.blocks.sdox.WLSSDODynamicStubHelper
    [01:44:28 PM] See server logs or server console for more details.
    [01:44:28 PM] weblogic.application.WrappedDeploymentException: oracle.integration.platform.blocks.sdox.WLSSDODynamicStubHelper
    Do we need SOA server for this to deploy or can deploy on Admin Server also? Please help me
    Regards,
    Ramesh.
    Edited by: user10956358 on Jul 25, 2012 6:30 PM

    I am using FusionOrderDemo_R1PS4 for FOD, but I am trying to build it on SOA_11.1.1.6.0_GENERIC_111217.1257. I know that there could be some mismatch, but I want to fix them.
    Any way to fix this without using SOA earlier version?

  • Embedded SQL against Oracle Question

    Software: Forte 3.0.J.
    Server Platform: HPUX 10.2
    Database: Oracle
    Problem Description: During the course of development, I ran into a
    problem using multiple columns in an sql UPDATE/SET statement. I was trying
    to update a.COLUMN_1 and a.COLUMN_2, which constitute part of the primary
    key of associative TABLE_A (a). In order for me to make the update, I
    needed to use the existing value of a.COLUMN_1 to lookup the new b.COLUMN_1
    in TABLE_B (b). Where a.COLUMN_1 = b.RELATED_COLUMN_1, I am able to find
    each b.COLUMN_2 that correspond to each a.COLUMN_2.
    I was able to resolve the issue by separating the two columns so
    that each had it's own select statement. Theoretically, it appears that
    this shouldn't work, because the SET statement for a.COLUMN_1 would cause
    the a.COLUMN_1 reference in the select statement of a.COLUMN_2 to be
    overwritten.
    In spite of this, I tried it, and it worked. I would like to
    understand why the sql works, and how sql actually executes the statement.
    Here is the sql:
    UPDATE TABLE_A a
    SET a.COLUMN_1 =
    (SELECT DISTINCT b1.COLUMN_1
    FROM TABLE_B b1
    WHERE b1.RELATED_CASE_ID =
    a.COLUMN_1 AND
    b1.RELATED_COLUMN_TYPE_CD = 'NEPHI'),
    a.COLUMN_2=
    (SELECT DISTINCT b2.COLUMN_2
    FROM TABLE_B b2
    WHERE b2.RELATED_COLUMN_1=
    a.COLUMN_1 AND
    b2.RELATED_COLUMN_TYPE_CD = 'NEPHI' AND
    b2.RELATED_COLUMN_2= a.COLUMN_2)
    WHERE a.COLUMN_1 = 100
    The table structure is as follows:
    TABLE_A: (primary keys are bolded) This is an associative table.
    Column_1 and Column_2 comprise the pk of one table; Column_3 and Column_4
    comprise the pk of another table. Assume that the Column_1 and Column_2
    values replacing the original values already exist in the parent table of
    which they form the pk).
    COLUMN_1
    COLUMN_2
    COLUMN_3
    COLUMN_4
    COLUMN_5
    TABLE_B: (primary keys are bolded) This is a reference table.
    COLUMN_1
    COLUMN_2
    RELATED_COLUMN_1
    RELATED_COLUMN_2
    RELATED_COLUMN_TYPE_CD
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    If you do an explain plan or set autotrace on against this update statement,
    you'll find that the select operations are actually executed first by Oracle
    - I believe because of the nature of the transaction. Thus, no problem.
    Brian Wilson
    U.S. Bancorp Piper Jaffray
    [email protected]
    Phone (612) 342-5682
    From: David Pettit[SMTP:[email protected]]
    Reply To: David Pettit
    Sent: Friday, April 30, 1999 1:58 PM
    To: '[email protected]'
    Subject: Embedded SQL against Oracle Question
    Software: Forte 3.0.J.
    Server Platform: HPUX 10.2
    Database: Oracle
    Problem Description: During the course of development, I ran into a
    problem using multiple columns in an sql UPDATE/SET statement. I was
    trying
    to update a.COLUMN_1 and a.COLUMN_2, which constitute part of the primary
    key of associative TABLE_A (a). In order for me to make the update, I
    needed to use the existing value of a.COLUMN_1 to lookup the new
    b.COLUMN_1
    in TABLE_B (b). Where a.COLUMN_1 = b.RELATED_COLUMN_1, I am able to find
    each b.COLUMN_2 that correspond to each a.COLUMN_2.
    I was able to resolve the issue by separating the two columns so
    that each had it's own select statement. Theoretically, it appears that
    this shouldn't work, because the SET statement for a.COLUMN_1 would cause
    the a.COLUMN_1 reference in the select statement of a.COLUMN_2 to be
    overwritten.
    In spite of this, I tried it, and it worked. I would like to
    understand why the sql works, and how sql actually executes the statement.
    Here is the sql:
    UPDATE TABLE_A a
    SET a.COLUMN_1 =
    (SELECT DISTINCT b1.COLUMN_1
    FROM TABLE_B b1
    WHERE b1.RELATED_CASE_ID =
    a.COLUMN_1 AND
    b1.RELATED_COLUMN_TYPE_CD = 'NEPHI'),
    a.COLUMN_2=
    (SELECT DISTINCT b2.COLUMN_2
    FROM TABLE_B b2
    WHERE b2.RELATED_COLUMN_1=
    a.COLUMN_1 AND
    b2.RELATED_COLUMN_TYPE_CD = 'NEPHI' AND
    b2.RELATED_COLUMN_2= a.COLUMN_2)
    WHERE a.COLUMN_1 = 100
    The table structure is as follows:
    TABLE_A: (primary keys are bolded) This is an associative table.
    Column_1 and Column_2 comprise the pk of one table; Column_3 and Column_4
    comprise the pk of another table. Assume that the Column_1 and Column_2
    values replacing the original values already exist in the parent table of
    which they form the pk).
    COLUMN_1
    COLUMN_2
    COLUMN_3
    COLUMN_4
    COLUMN_5
    TABLE_B: (primary keys are bolded) This is a reference table.
    COLUMN_1
    COLUMN_2
    RELATED_COLUMN_1
    RELATED_COLUMN_2
    RELATED_COLUMN_TYPE_CD
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    Nondeposit investment products are not insured by the FDIC, are
    not deposits or other obligations of or guaranteed by U.S. Bank
    National Association or its affiliates, and involve investment
    risks, including possible loss of the principal amount invested.
    Past performance does not guarantee future results. We consider
    our sources reliable. Accuracy and completeness are not guaranteed.
    Information is subject to change. Transactional details should not
    be relied on for tax purposes and do not supersede normal trade
    confirmations or statements. Messaging outside U.S. jurisdictions
    from U.S. Bancorp Piper Jaffray to non-institutional parties is not
    intended for solicitation purposes.
    Electronic mail sent through the Internet is not secure. We will
    not accept time-sensitive, action-oriented messages, transaction
    orders, fund transfer instructions or check stop payments
    electronically.
    If you are not the intended recipient, notify the Sender. This
    information is intended only for the person named above and for
    the purposes indicated. Do not distribute this message without
    written consent of the author. Non-business opinions may not
    reflect opinions of U.S. Bancorp Piper Jaffray and its affiliates.
    U.S. Bancorp Piper Jaffray and its affiliates reserve the right to
    monitor all e-mail.
    Securities products and services are offered through
    U.S. Bancorp Piper Jaffray Inc., member SIPC and NYSE, Inc.,
    a subsidiary of U.S. Bancorp.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Learning PL/SQL in Oracle 10G XE

    Successfully installed Oracle 10G XE on my desktop. I'm a newbie Oracle user who wants to learn PL/SQL through Oracle 10G XE.
    Is this possible? Hope you can give me tips and advice on how I would start with this?
    Thanks!

    Certainly possible. I would suggest you crack open the PL/SQL Users Guide. DO you have previous programming experience? If so, looks at the examples.

Maybe you are looking for

  • Cell border removal in JTable

    I've created a JTable with a DefaultCellRenderer. I need a way of removing the border that appears around each cell(deafult yellow colour) and instead replace it with no border or a border that goes around the entire row. Any ideas?

  • Report data ( value ... tag) missing in the Webi report retrieved through RestFul Webservice

    I am trying the below URL to get the WEBi report from SAP BO using the Rest Webservice support that is now available. http://{serverIP:serverPort}/biprws/raylight/v1/documents/{documentId} I am able to get the report but as I compare the same report

  • Memory Leak with 10.6.4

    This is very unusual for my Mab Desktops to do, but all I can figure is that there is a memory leak in the latest update 10.6.4 and that it is effecting everything. I ran a few apps on Friday night, closed then down but left the computer running. Thi

  • For MM - MMBE - Average consumption movement types

    Hello friends, I am developing Report for Stock Analysis - MMBE. For avg. consumption calculation I am using table S531. Prblem is I get only consumption with mov. type -201, 641, 601, 261 but with this Four I also want records of Materials which go

  • Datatype mapping problem

    Hi I've have a table with column with int4[] as data type. I have a problem with setting the type of corresponding entity bean field. I still have a message about not proper datatypes - byte array instead of integer[]. To be precise, message is: java