MS Sql to oracle conversion

I am woking on small project, on which i am to convert data from SQL Server to Oracle. I am using Oracle Data Integrator. Can any body tell me the steps for it to do ?
what i have done uptil now is that i have created master and work repsitories, now using topology manager, i have created logical and physical architectures. Now next what should I do now. ?
Waiting for your reply

1) Try to use a JDBC DRIVER for SQLSERVER
2) in your DESIGNER, create a diagram in a new Oracle model. Drag and drop all the Datastore from your SQLSERVER Model.
3) Right clic on your Oracle Model and generate INTERFACE IN.
You have created 500 interfaces for transfering your Data from SQLSERVER to ORACLE.
4) How to create the table in your Oracle Server
i) Right clic on your Oracle Model and Generate DDL, ODI create the script for creating all your tables and constraintes
ii) For each Interface choose the OPTION CREATE TARGET TABLE in the IKM
(If you choose this option, Update your IKM before generating the interface to set default value of this option to yes)

Similar Messages

  • Converting Oracle TIMESTAMP(4) column to SQL datetime column conversion error in ssis

    I could not able to convert Oracle TIMESTAMP(4) column to SQL datetime column conversion error in ssis.
    I'm connecting OLEDD Oracle Source to OLEDB SQL Destination in SSIS package. I'm trying to insert data from oracle datetime column into sql datetime column. I'm getting some errors.
    Please provide helpful info.

    You can transform the data types directly at the source by writing a proper SQL statement, or you can convert them using the data conversion component.
    Please refer the below link
    http://stackoverflow.com/questions/6256168/how-to-convert-a-timestamp-in-string-format-to-datetime-data-type-within-a-packa

  • 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

  • MS SQL to Oracle Problem:  nvarchar's being loaded as null varchar2's

    If anyone has any insight into this, I would really appreciate it.
    I'm trying to build an incredibly simple Interface that mirrors a small MS SQL Server table into and Oracle table. The source MS table is a series of int, smallint, numeric, datetime and nvarchar columns. Similiarly, I've built my Oracle target table to be comprised of corresponding number, date and varchar2 columns.
    The issue is that my Interface runs just fine, but only the date and number-related columns actually come across. All the columns that are loading nvarchar->varchar2 are simply populated with nulls.
    I can't seem to figure out what the problem that ODI is having. There are no errors during execution, and back in Designer I can even do a "View Data" on the source MS table, and can browser all the data just fine.
    Something is happening during transit and I can't figure out why. My current LKM is "LKM SQL to Oracle" though I've also tried "LKM SQL to SQL" with no luck. Clearly something is happening with the nvarchar to varchar2 conversion, but that seems like a ridiculous thing for ODI to have a problem with. Even moreso that's it not actually throwing any errors, but simply not populating them.
    Anyone have any thoughts?
    Thanks
    John

    Dev-
    Thanks for replying. And that's funny, I think you were posting your comment right as I was posting my quick additional detail one.
    Yes, I have actually already tried that. I have set the LKM to keep temporary tables so that I could check the C$_... table. And the nvarchar columns are already showing as null there. And there are no joins in this Interface at all. It is a very simple interface that mirrors a single small source table, into a clone on the Oracle side for staging purposes ( A [MSSQL] ---> B [Oracle] ).
    So, because the C$_ is already showing nulls for the columns that were nvarchar, it seems something is happening in transit while converting the nvarchar to varchar2.
    Thanks
    John

  • 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;

  • 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
               ))

  • 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.

  • 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.

  • Can We use FDM as ETL tool between SQL and Oracle

    I want to use FDM as ETL tool between SQL and Oracle. Can it be possible. I didn,t found any target adapter for oracle database.My source system is SQL and Target system is Oracle database.
    Rahul
    Edited by: user12190125 on Nov 9, 2009 4:23 AM

    Rahul,
    I believe this is possible to do, but not an easy one and there are a few considerations:
    How much data are you processing? FDM has a lot of features which support the business process. While this is great for users and audit trail etc. it slows down performance if you want to process a lot of data. It also depends on the type of mappings you use (Like mappings are slower than explicit mappings).
    How familiar are you with VBScript? There is no explicit target adapter for Oracle, but there is a data mart adapter which can be used for anything. You have to implement everything yourself though, mainly the Export and Load actions. In there you will also have to handle the the connections to the MSSQL and Oracle databases.
    Check the data mart adapter and see if you feel comfortable with defining the vb code in there. There are reasons for and against this approach. ODI would probably be the better choice unless you really need to have FDM's process support.
    Regards,
    Matt

  • Guide to differences between SQL Server Transact SQL and Oracle PL/SQL

    Does anyone know of a good book (or online guide) that has an in-depth comparison of the differences between SQL Server Transact SQL and Oracle PL/SQL? (Something more than a beginner's guide)

    Hello,
    Below links will surely be helpful
    Discontinued features in SQL 2012
    Depricated features in SQL Server 2012
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

Maybe you are looking for

  • Installation problem in Linux Slackware 7.1

    So that we may better diagnose DOWNLOAD problems, please provide the following information. - Server name - Filename - Date/Time - Browser + Version - O/S + Version - Error Msg I try install Oracle 8i Enterprise in Linux Slackware 7.1 (kernel 2.2.16)

  • Oracle 8i Database Download

    Hi, Can anybody give me the link to get Oracle8i Database for solaris. Thanks, Ashwin

  • UDF to replace characters in free text?

    Hi experts, If I have dates such as "2009.11.12" in a free text I need to change those to "2009-11-12". Basically I have to replace dots with a hyphen. I am thinking of a UDF but could not find one in the forum. Does anyone have an idea how to achiev

  • Scripting in Captivate

    Greetings! Can you help me with scripting in JavaScript. I want to know how to use the Execute JavaScript feature. Could you also guide me to some sample scripts with the actions they do, tutorials kind of where I can learn how to script. Thanks.

  • Spamassassin not working?

    Hello all, first sorry for my very bad english, i come from Germany I think that Spamassassin works not very well on my System, it doesn't learn which mail is spam and which is not, even the score in the Server Admin is set to 1. I try to train the B