Change the Joing Type of two tables

I joined 5 tables using sq01 and sq02 and once table contains multiple records for the primary key. since it allows only inner joins and outer joins final results multyply based on the table. is there any way i can use other joins like right outter join or some thing.
Please make your comments
Pubudu

Canceled

Similar Messages

  • Changing the same column in two tables at the same time

    Hi,
    Oracle 10g2
    I have 2 tables:
    1. tab1 : Stores people info
    2. tab2 : Stores people insurance info
    Both have an address field.
    What I need to do is when tab1.address is updated I want the tab2.address to update automatically and
    when tab2.address is updated I want tab1.address to update.
    Is there a way to do this using triggers without having these triggers mutate?
    Thanks,
    Oleg
    Edited by: user635344 on Oct 8, 2009 11:04 AM

    Hi, Oleg,
    Centinul, Toon, Hoek and Peter are right. (It would be unusual if any one of them were wrong.)
    The addresses really ought to be in one table.
    If you really must have them in two (or more) tables, then don't INSERT or UPDATE addresses direectly into the tables; use a separate stored procedure, not a trigger.
    If you really must use a trigger (and this means a trigger on each table), then before each trigger updates the other table, check a flag to see if the current table is being updated because of DML on the other, and, if so, do nothing. If the current table is not being updated because of DML on the other, then set the flag before doing the update.
    In the example below, I used a package variable as the flag. You could also use a SYS_CONTEXT or a Global Temporary Table.
    CREATE TABLE tab1
    (      id    NUMBER
    ,      addr  VARCHAR2 (25)
    DROP TABLE     tab2;
    CREATE TABLE tab2
    (      id    NUMBER
    ,      addr  VARCHAR2 (25)
    CREATE OR REPLACE PACKAGE pk_x
    AS
        -- This package contains no functions or procedures, only 1 variable:
        table_of_origin     varchar2 (30);
    END     pk_x;
    CREATE OR REPLACE TRIGGER     tab1_aiu
    AFTER INSERT OR UPDATE OF addr on tab1
    FOR EACH ROW
    BEGIN
         IF  pk_x.table_of_origin  IS NULL
         THEN
              pk_x.table_of_origin := 'TAB1';
              UPDATE  tab2
              SET     addr     = :NEW.addr
              WHERE     id     = :NEW.id;
              pk_x.table_of_origin := NULL;
         END IF;
    END     tab1_aiu;
    CREATE OR REPLACE TRIGGER     tab2_aiu
    AFTER INSERT OR UPDATE OF addr on tab2
    FOR EACH ROW
    BEGIN
         IF  pk_x.table_of_origin  IS NULL
         THEN
              pk_x.table_of_origin := 'TAB2';
              UPDATE  tab1
              SET     addr     = :NEW.addr
              WHERE     id     = :NEW.id;
              pk_x.table_of_origin := NULL;
         END IF;
    END     tab1_aiu;
    /I made this example as simple as possible. Production code would be a lot more complicated (e.g., checking to see if id was changed).
    I tested this using the DML statements below.
    The contents of both tables is shown after each statement.
    INSERT INTO tab1 (id, addr) VALUES (1, '1 First St.');
          ID_1 ADDR_1                          ID_2 ADDR_2
             1 1 First St.
    INSERT INTO tab2 (id, addr) VALUES (1, 'Forstagatan 1');
          ID_1 ADDR_1                          ID_2 ADDR_2
             1 Forstagatan 1                      1 Forstagatan 1
    UPDATE        tab1
    SET        addr     = 'Primo Place'
    WHERE        id     = 1;
          ID_1 ADDR_1                          ID_2 ADDR_2
             1 Primo Place                        1 Primo PlaceThe query that displayed the contents is:
    SELECT  tab1.id           AS id_1
    ,     tab1.addr     AS addr_1
    ,     tab2.id           AS id_2
    ,     tab2.addr     AS addr_2
    FROM                tab1
    FULL OUTER JOIN           tab2     ON     tab1.id     = tab2.id
    ORDER BY   NVL (tab1.id, tab2.id);

  • How to change the partition type on a table with data

    Hi
    I have a table, which is partitioned by list on date column. The table contains large volume of data.
    My requirement is to make the list partition into range on the same date column.
    I am working on Oracle10g
    Kindly advice

    partitioned by list on date How many distinct DATE values do you have ? Each DATE value would be a Partition in List Partitioning.
    Why do you need to convert this to RANGE Partitioning ? How many DATE values do you expect in the table in the future ?
    You can use DBMS_REDIFINITION to copy a LIST Partitioned Table to a RANGE Partitioned Table and then switch the tables at the end.
    See examples (where the source table is not partitioned)
    http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php
    http://uhesse.com/2010/02/15/partitioning-a-table-online-with-dbms_redefinition/
    But before converting I would justify why a LIST Partitioned Table be converted to RANGE Partitioned. Do you have Date-Range queries ?
    Hemant K Chitale
    Edited by: Hemant K Chitale on Mar 15, 2013 2:11 PM

  • How to change the data type in the table ESLL for the field USERF2_NUM ?

    Hello Friends,
    I have a requirement in which one of the change is to convert the data type of the field 'USERF2_NUM' in the table 'ESLL'  from 'QUAN' to 'CHAR'. 
    How do i do it if i have an access to change it..........i think i should also check the impact of the change if done.
    Kindly tell me as my requirement starts with this small change.
    Regards,
    Rajesh Kumar

    Thanks for the reply Sowmya.
    I would like to know 2 things.
    1. Is it ok to change the data type of the field 'USERF2_NUM '  which is in the table ESLL. from quan to char.
    2.  The table ESLL  already has entries. if we change the data type from QUAN to CHAR what is the  effect on the existing entries of the table .
    Kindly reply me back.
    Thanks & Regards,
    Rajesh Kumar

  • Activation error while changing the data type of a field of a table

    hi friends,
    i am facing one problem while changing a data type of a field of a table.
    i just created one table(Yqm32) .i have assigned charcter data type to one field(ztotal_count) .now i want to change this charcter data type to numeric data type.
      while changing to NUMC data type activation error is comming as below.
    Table is not yet classified                           
    Field ZTOTAL_COUNT: Type change                       
      ALTER TABLE is not possible                         
    Structure change at field level (convert table YQM32) 
    Check on table YQM32 resulted in errors   
    Table YQM32 could not be activated                       
    (E- Structure change at field level (convert table YQM32)
    plz suggest.i need to change the data type from char to numc.
    Thanks & Regards

    Hi Pabitra......
    From the SE11 change the table as u wanted and then from menubar select
    UTILITIES--> DATABASE UTILITY
    It will open database utility
    there u select the Activate and adjust database button.
    then the database table will get adjusted.
    just try it once.........
    Suresh......

  • Can we change the data type of a field based on the value of the field

    HI Gurus,
    My Requirement is as below -- Could you please guide me
    in the Printable Adobe form -- for ex - as usual for dates fields in the Object Pallette the object type is a date/time field  and for quantity/currency fields corresponding fields are taken
    now in case the either the date, quantity or currency is initial in place of displaying 0.00 or empty date we need to display N/A (Not Applicable)
    for this I would like to change the data type of the field
    to put it simply --
    we need to change the data type of date field from DATE&TIME to Char type to hold N/A or  Quantity field to Char field to hold N/A
    how can we realize this in SAP adobe forms
    Thanks in Advace
    Ramchander Rao.K

    Hello Ramchander,
         You cannot change the data type of the field at run time in Adobe forms because the type of field you choose at the time of design level is associated with the data type itself.
    If you want to achieve your requirement, then your main idea should be to set the data type as CHARACTER itself while designing the field in the adobe form itself. CHAR field will comfortably hold the value of Calculation/amount field, Currency field, Amount, Date, Time HHMMSS, Unit Accuracy, Currency key, Floating point number, Numeric text, Client, Language and many other data types.
    After designing the field as TEXT field in Adobe form you have two options.
    Option 1:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms.
    Suppose the name of the field is TEXTFIELD1, then write the Javascript code on this field in Initialize event as below.
    if ( this.rawvalue == null )
         this.rawvalue = "N/A";
    If the field is not blank, then it will show the date. Else it will show "N/A".
    Option 2:
    Select the Date field initially as type TEXT field or CHAR field in Adobe forms. Do the formatting part in ABAP itself. It will increase the performance. Avoid Javascript as much as possible.
    Suppose you have a DATE variable l_dats of type DATS. Then take another variable l_date of type CHAR. Then write the below ABAP code.
    MOVE l_dats TO l_date.
    IF l_date IS INITIAL.
         l_date = 'N/A'.
    ENDIF.
    Bind the l_date to the TEXT field in the form.
    Even in this case, if the field is not blank, then it will show the date. Else it will show "N/A".
    But I will suggest you to use Option 2 of keeping the AMOUNT, QUANTITY, DATE, TIME fields etc as CHAR or TEXT fields in Adobe form and do the required formatting in ABAP itself.

  • How to Change the data type of infoobject from NUMC to CHAR

    Hi Experts,
    I have created an infoobject with data type as NUMC, i used in DSO as a key figure and i have loaded data up to PSA.
    Now i want to change the data type of this Info Object from NUMC to CHAR.
    Can anyone suggest me the solution for this issue.
    Regards,
    Venu Gopal.K

    Hi pavan/binu,
    I have not loaded data into DSO i just added IO in Key fields and i started editing this IO then im facing error like
    1.Master Data Table /BIC/PZCUSTOMER contains data: Characteristic ZCUSTOMER cannot be activated     
    2.SID Table /BIC/SZCUSTOMER contains data: Characteristic ZCUSTOMER cannot be activated
    Im also unable to edit the P & S tables in SE14.
    NOTE:I have data only in PSA and when im trying to load data to DSO Im facing these issues.

  • Change the Pricing Type during billing

    We are facing an issue with the rebate conditions which needs to be resolved asap..
    User has created a credit memo request in VA01.
    Credit memo request is created for the change in the Price.
    (Note: Order reason for such specific credit memo requests is ZXX (e.g.))
    Due to price change rebate accruals value is also reduced in proportion to the reduced price.
    The rebate accruals should not be reduced in this case, since there is no material return and rebate condition is quantity based.
    As a solution to this u2013
    We created a new routine AAA and assigned to the rebate condition types in Pricing procedure.
    This routine will function when order reason entered in the Credit memo request is ZXX.
    Therefore all the rebate condition types (assigned with routine AAA in Pricing) will get deactivated in Order Conditions tab.
    This is working correctly in creating credit memo (VA01).
    The issue is u2013
    When the credit memo is created in VF01, these rebate condition types are again activated and accruals are posted.
    This should not happen. Pricing from the CM request (VA01) should get copied in Credit memo (VF01) completely. The same issue
    with VF02..
    Please  suggest a user exit in which the pricing type can be changed during billing..Tried coding in the form
    USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ by changing the Pricing Type KNPRS..But didnt work out..
    Is there any way to meet this requirement. I have checked the user exit RV61AFZA having two forms:
    FORM USEREXIT_PRICING_RULE &
    FORM USEREXIT_PRICING_COPY.
    I would be interested to know how this can be  coded to meet the requirement. Coding displayed will be of great help to
    implement.
    Any pointers / solutions to the issue will be highly appreciated..
    Moderator message - Please do not offer points or rewards
    Edited by: Rob Burbank on Jul 29, 2010 12:34 PM

    Hello Sean
    1) Firstly I don't think the Credit Memo for this case or any case in your situation should be relevant to rebate.  That's becasue your rebate is tied to quantity.  So you should deactivate rebate processing for that Billing Doc type. T Code OVB0. That should close the issue.
    2) Pricing type 'D' in copy control from sales to Billing documents should ensure that Pricing from the CM request (VA01) gets copied in Credit memo (VF01) completely. Why do you need user exits for that? T code VTFA.
    3) If you need to change pricing type selectively for some conditions, then you should configure the condition type with condition category X,Y or Z ( Customer Reserve) and then use USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA to ensure that those conditions are copied (or otherwise) from source. But I don't think you need this.

  • How to change the images dynamically in a table.

    Hai,
                     How to change the images dynamically in a table based on the condition in webdynpro abap.
    Edited by: Ravi.Seela on Oct 13, 2011 2:17 PM

    This has been much discussed earlier. Do search posts.
    For your scenario i would do the following.
    inside your node which is binded to the table, i create a new node image with cardinality 1 ..1 and a attribute called path of type string.
    create a  supply function for the node image .
    Supply method now has a Element (Parent element ) and node.
    Based on your record in element, set the right image source to path attribute and bind the node.
    This will make sure that the framework calls the image supply function for every row in a table.

  • Changing the Cursor Type

    Good Morning Everyone,
    I am creating a report with a barchart in a column of the report. i have been following these for reference. (mainly the first link)
    http://htmldb.oracle.com/pls/otn/f?p=31517:183:5430906720971021::NO
    http://apex.oracle.com/pls/otn/f?p=220:1:1602821811068326
    http://apex.oracle.com/pls/otn/f?p=220:2:8706839551396459
    I have sucessfully got the "progress bar" in place on my report. Now what i would like to do is change the cursor type, but im struggling.
    This is the basic lay out of the code which i am using,
              '<img src="'
           || '#WORKSPACE_IMAGES#'
           || 'green.gif" height="20" width="'
           || TO_CHAR (random_value)
           || '" '
           || 'title="'
           || TO_CHAR (random_value)
           || '% completed'
           || '" />'
           || '<img src="'
           || '#WORKSPACE_IMAGES#'
           || 'red.gif" height="20" width="'
           || TO_CHAR (100 - random_value)
           || '" '
           || 'title="'
           || TO_CHAR (100 - random_value)
           || '% open'
           || '" />' progress_barPlease could someone help me :)
    Thanks in Advance,
    -N.S.N.O.

    Hey Guys,
    Thanks for your input, i solved my problem :D The style part of the code at the bottom did the trick.
    -N.S.N.O.
    '<img src="'
    || '#WORKSPACE_IMAGES#'
    || 'green.gif" height="20" width="'
    || TO_CHAR (UKXP)
    || '" '
    || 'title="'
    || TO_CHAR (UKXP)
    || '% of tables turned on'
    || '" '
    || 'style="cursor:help";'
    || '" />'
    || '<img src="'
    || '#WORKSPACE_IMAGES#'
    || 'red.gif" height="20" width="'
    || TO_CHAR (100 - UKXP)
    || '" '
    || 'title="'
    || TO_CHAR (100 - UKXP)
    || '% of tables turned off'
    || '" '
    || 'style="cursor:help";'
    || '" />'

  • How to change the order type

    Dear friends,
    Please tell me the transaction code to change the orger type.
    suppose  we have an order having type Zrox we want to change the order type from Zrox to Zmto what should I do and how can I do .

    Hi
    For single order use <b>VOV8 </b>and for Mass use T code <b>MASS</b>
    <b>
    Changing by MASS</b>
    There is transaction <b>MASS </b>which can be used to carry out mass changes in the sales order and other objects.
    Mass Maintenance: (Use to change multiple fields in multiple documents at the same time). I have done mass change for customers; and orders should work the same way too.
    1) Try t-code [MASS] and select sales orders & execute
    2) Choose the table or tables for your selection criteria and also for fields you want to change.
    Then execute. (suppose your selection criteria fields are from “sales order header data” table and the field you want to change, is in “item data” table)
    3) Put in the sales documents(21000000, 21000001) you want to change and also the items(10) you want to change. – click on ” choose selection fields” button – From the Pool, move the fields you want to the “select fields” using arrows.
    4)From mass maintenace menu, click on “Enter new field values”
    -click on “sales order item data” tab and choose the field you want to change.
    (for example. I want to change plant for item 10)
    -enter the new value (of the plant to be)
    -click on “Adopt” and execute
    5)In “sales order item data” tab, you see the new value of the plant you entered at the top and the old values of item 10 are below.
    -click on “change field values” button. you see all the old values are changed to new values.
    -save
    Note: it will take some time depending on how many records you have.
    Check: Go to [SM37] and see the status of the job you are running and once finished, export the spool file to a spreadsheet.
    Before you do mass maintenance, go to the particular table in [se16] and get the results. Then do the mass maintenance and compare the results with this one. If they match, then you are good to go.
    Note: If you have any user exits that affect the results, ask them to deactivate the MODCHECKS still you are done with mass maintenance & activate them again.

  • Which transaction can  change the order type

    Dear friends,
    Please tell me the transaction code to change the ORDER TYPE.
    Regards

    Hi You can use <b>VOV8 </b>for single sale order change If you want mass change u can use <b>MASS </b>t code
    For Billing document you can use <b>VTFL</b>
    For Mass Change refer below
    There is transaction MASS which can be used to carry out mass changes in the sales order and other objects.
    Mass Maintenance: (Use to change multiple fields in multiple documents at the same time).  I have done mass change for customers; and orders should work the same way too.
    1) Try t-code [MASS] and select sales orders & execute
    2) Choose the table or tables for your selection criteria and also for fields you want to change.
    Then execute. (suppose your selection criteria fields are from "sales order header data" table and the field you want to change, is in "item data" table)
    3) Put in the sales documents(21000000, 21000001) you want to change and also the items(10) you want to change.
    - click on " choose selection fields" button
    - From the Pool, move the fields you want to the "select fields" using arrows.
    4)From mass maintenace menu, click on "Enter new field values"
    -click on "sales order item data" tab and choose the field you want to change.
    (for example. I want to change plant for item 10)
    -enter the new value (of the plant to be)
    -click on "Adopt" and execute
    5)In "sales order item data" tab, you see the new value of the plant you entered at the top and the old values of item 10 are below.
    -click on "change field values" button.  you see all the old values are changed to new values.
    -save
    Note:  it will take some time depending on how many records you have.
    Check:  Go to [SM37] and see the status of the job you are running and once finished, export the spool file to a spreadsheet.
    Before you do mass maintenance, go to the particular table in [se16] and get the results.  Then do the mass maintenance and compare the results with this one.  If they match, then you are good to go.
    Note:  If you have any user exits that affect the results, ask them to deactivate the MODCHECKS still you are done with mass maintenance & activate them again.

  • How do i change the media type on a digital booklet when they option bar is greyed out?

    I downloaded an album a couple days ago which came with a digital booklet. I am trying to put it on my phone but need to change the media type to book to be able to do this. whenever I go to the get info tab, the options tab is completely greyed out and wont let me do anything to it. I have tried selecting read only on the file and it did not work. I have windows 8. If there's is any different way of getting this on my phone, anything would be great!

    The item must not be read only if you want to change it.
    In the new Get Info dialog the Media Kind is in a light grey. Next to that will be the word Music. Hover over it and you should see that it is part of a drop down list control, click and select Book.
    tt2

  • I tried to change the file type of the movie, but now I am unable to open/edit it in iMovie, HELP !

    I tried to change the file type of the movie, but now I am unable to open/edit it in iMovie, HELP !

    Thank you very much! This is exactly what I was looking for.
    I appreciate your time and effort in solving my question : )

  • How can we change the message type?

    Hello all
    We use SRM server 5.5 with classic scenario.
    When we create shopping cart, we implemented the Change Badi to assign the purchasing group from R/3 material master.
    We implemented the following logic.
    If material master in R/3 has no purch. Group, SRM also has no purch. Group. So SRM display the error message “You should select the purch. group” to determine the purchasing group in basic view.
    But, We have the standard error message, when we choose the material code – this material code has no purch. Group in R/3 – “No purchasing groups were found”.
    Message number is BBP_ATTR050.
    Because of this message, we can not progress the process to create shopping cart.
    Can we change the message type from Error to Warning Message?
    Or, Can we delete this message?
    Thank you,
    Best regards,
    SH

    Yes. You are right.
    When user choose the material code, there is no purch. group in 1st Step, but
    we want to choose the purch. group in 2nd Step on basic view.
    But we have the error message at 1st step. so we can not progress to 2nd Step.
    If we use dummy purch. group, user could make the human mistake.
    So our customer want to remove purch. group and choose the purchasing group by user.
    But i'm not sure if we remove this error message, we got solve this problem..
    Pls give me an idea..
    Message was edited by:
            So Hee Lee

Maybe you are looking for