Nested Merge ??

I don't know where to begin to solve this issue.
I have a three tables:
<ul><li>Servers</li>
<li>Software </li>
<li>Software_Lookup</li>
</ul>
Servers.ID = serverlookup_id and Software.software_id = softwarelookup_id a
   IF NOT MATCHED THEN
      Servers.ID = serverlookup_id b
         IF MATCHED THEN
            update software_lookup set softwarelookup_id = (select software_id from software where software_name = 'Sysback' and software_version = '5.6.8.3')
               where (select "ID" from servers where host_name = 'ibm303')
         IF NOT MATCHED THEN
            insert (a.serverid_lookup,a.softwareid_lookup) values (b."ID",b.software_id);
      )if you can throw some keywords/concepts my way so I can start searching on the net and learning how to do this .. it would be greatly appreciated.

Okay .. I think I'm going to attempt a package instead
create or replace package software_pkg -- package spec
AS
     procedure checksoftware     (
     p_hostname varchar2,
     p_software varchar2,
         p_softwarename varchar2,
     p_checksoft number,
     p_checkhost number
     end software_pkg;
SHOW ERRORS
CREATE or REPLACE PACKAGE BODY softwarepkg AS -- package body
     procedure checksoftware     (
        p_hostname varchar2,
        p_software varchar2,
             p_softwarename varchar2,
        p_checksoft number,
        p_checkhost number
     end checksoftware;
IS
   BEGIN
     p_checksoft :=
        select SOFTWARELOOKUP_ID from software_lookup
           INNER JOIN software on software_id = SOFTWAREID_LOOKUP
        where software.software_name = :p_softwarename
        and software.software_version = :p_software
     p_checkhost :=
        select SOFTWARELOOKUP_ID from software_lookup
        INNER JOIN servers on "ID" = SERVERID_LOOKUP
        where servers.host_name = :p_hostname
       CASE
           WHEN      p_checkhost IS NULL
              THEN
             CASE     
                WHEN p_checksoft IS NULL
                   THEN
                     insert into software_lookup
                    (serverid_lookup,softwareid_lookup)
                       values
                       select "ID",software_id
                       from servers,software
                       where host_name = :p_hostname
                       and software_name = :p_softwarename
                       and software_version :p_software
               END CASE;
     END CASE;
END softwarepkg;  
SHOW ERRORS

Similar Messages

  • What is the most versatile way to conform production audio after the edit has started?

    This problem keeps coming up on various projects and I have yet to find the best way to recover from it: A project will be synced with incomplete production audio. Either it will be delivered to post late or an AE brought it in with the incomplete number of channels.
    I'm trying to find the best way to conform audio to an edit that has already been cut with all channels accessible in the timeline. FYI, the audio I would need to conform usually has the same timecode as the audio already in the cut. It sort of works to match frame and resync to the original nested/merged clips but if, for example, the audio is 5 channels the audio shows up in the timeline nested as 2 channels. This means every time I need to do a production audio edit I have to match back to the nested clip and edit there instead of the actual edit itself.
    I know I must be missing something here that could make this really easy to recover from. Often the circumstances in which this happens are completely out of my control.

    If the channels always matched, I'd say the easiest would probably be to just replace the old audio on the hard drive with the new, delete all Cache files and rebuild.
    Given the difference in channels, I think the easiest solution may simply be to not begin editing until you have final audio.
    Failing that, you just might be stuck with a tedious mess.

  • Can you create nested condition in merge(e.g. insert/update) using owb

    Hi,
    Does OWB9iR2 allow you to build in nested condition in merge. such as
    If no match on col1 and col2 then
    if col3 match then no new sequence insert <---
    else insert new sequence;
    else (there is match on col1 and col2)
    update col3 and sequence.
    I have an incremental load for a lookup table, where insert/update is used. There are two match columns and surrogate key is used. When there is no match, it shall not insert a sequence when there is a match on third column. I can not use the 3rd column in the original match because it shall be updated where there is a match for the two match column.
    I am trying to avoid using transformant for performance impact. Thanks

    HIi I think the misleading thing is that in PL/SQL you can use booleans, which is not possible in SQL. So in a PL/SQL tranformation, this is OK:
    a:= case when not orgid_lkup( INGRP1.ORG_ID )
    then get_supid(..)
    else ...
    but, the following SQL does not work:
    select case when not orgid_lkup( INGRP1.ORG_ID )
    then get_supid(..)
    else ...
    into a
    from dual;
    I ended up using only 0/1 as boolean return values for these reasons;
    so I can have:
    select
    case when orgid_lkup( INGRP1.ORG_ID ) = 0 then ...
    though true booleans are better if you don't have to embed them in SQL.
    Antonio

  • MERGE using nested table doesn't work on Oracle 9i

    Hi,
    Oracle 9i Enterprise Edition Release 9.2.0.4.0 on Red hat Linux
    SQL> create table PERSONS (
      2    ID  number(9)
      3   ,SURNAME  varchar2(50)
      4   ,constraint PERSONS_PK primary key (ID)
      5  );
    Table created.
    SQL> create or replace type T_NUMBER_ARRAY as table of number;
      2  /
    Type created.
    SQL> create or replace procedure P_MRGTS2 (P_ID  PERSONS.ID%type)
      2  is
      3    L_IDS  T_NUMBER_ARRAY;
      4  begin
      5    L_IDS := T_NUMBER_ARRAY(P_ID);
      6    merge into PERSONS P using (select * from table(L_IDS)) D on (
      7      P.ID = D.COLUMN_VALUE
      8    )
      9    when matched then update
    10      set SURNAME = 'Updated'
    11    when not matched then
    12      insert (
    13        ID
    14       ,SURNAME
    15      )
    16      values (
    17        D.COLUMN_VALUE
    18       ,'Inserted'
    19      );
    20  end;
    21  /
    Procedure created.
    SQL> exec P_MRGTS2(1)
    BEGIN P_MRGTS2(1,'Avi'); END;
    ERROR at line 1:
    ORA-22905: cannot access rows from a non-nested table item
    ORA-06512: at "OPS$AABRAMI.P_MRGTS2", line 9
    ORA-06512: at line 1However, the same code on Oracle 10g Release 10.2.0.1.0 on SUN Solaris 9 works.
    Is there any way to make it work on Oracle 9i?
    One way I found is the following:
    procedure P_MRGTST (P_ID  PERSONS.ID%type)
    is
      L_IDS  T_NUMBER_ARRAY;
    begin
      L_IDS := T_NUMBER_ARRAY(P_ID);
      forall I in L_IDS.first..L_IDS.last
        merge into PERSONS P using DUAL D on (
          P.ID = L_IDS(I)
        when matched then update
          set SURNAME = 'Updated'
        when not matched then
          insert (
            ID
           ,SURNAME
          values (
            L_IDS(I)
           ,'Inserted'
    end;On Oracle 10g there is negligible difference in time taken to execute both procedures, as displayed in SQL*Plus when issuing:
    set timing onIs there something that makes one of the procedures preferrable over the other?
    Thanks,
    Avi.

    Is there any way to make it work on Oracle 9i?
    michaels>  select * from v$version
    BANNER                                                         
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
    PL/SQL Release 9.2.0.8.0 - Production                          
    CORE     9.2.0.8.0     Production                                      
    TNS for HPUX: Version 9.2.0.8.0 - Production                   
    NLSRTL Version 9.2.0.8.0 - Production                          
    michaels>  create table persons (
        id  number(9)
           ,surname  varchar2(50)
              ,constraint persons_pk primary key (id)    )
    Table created.
    michaels>  create or replace type t_number_array as table of number;
    Type created.
    michaels>  create or replace procedure p_mrgts2 (p_id persons.id%type)
    is
       l_ids   t_number_array;
    begin
       l_ids := t_number_array (p_id);
       merge into persons p
          using (select * from table (cast (l_ids as t_number_array))) d
          on (p.id = d.column_value)
          when matched then
             update set surname = 'Updated'
          when not matched then
             insert (id, surname) values (d.column_value, 'Inserted');
    end p_mrgts2;
    Procedure created.
    michaels>  exec p_mrgts2(1)
    PL/SQL procedure successfully completed.
    michaels>  select * from persons
            ID SURNAME                                          
             1 Inserted                                         
    1 row selected.

  • Nested loop join v/s Sort merge

    I have seen that nested loops are better if the inner table is being indexed, because for each outer table row, we are looking for a match in the inner table. But is there any case when optimizer still goes for a nested loop even if there is no index on the inner table. That is my first question ?
    My second question := When doing a sort merge join oracle has to sort both result sets and then merge them. Oracle says that if both the row sets, if already sorted is definately better for performance. Ya thats obvious. But back to my upper question, when there is no index on the inner table, is it the situation when oracle goes for a sort merge join ?

    My response should really have examples but since I do not have any handy I will just say about your first question. If there is no index available from table A to table B yes it is possible a nested loop join may still be used and table B read via full table scan within a nested loop. If table B is very small and consists of only a block or two this may be relatively efficient plan. It is more likely you sould see table B full scanned and the result feed into a hash join, but I have seen the plan you mention.
    Back before hash joins were introduced with 7.3 (if my memory is correct) you would see sort/merge joins used more often than you do now. Generally speaking no index on the join conditions would exist for this option to be chosen.
    If you really want to know why and sometimes what the optimizer is going to do buy Jonathan Lewis's book Cost-Based Oracle Fundamentals. If explains the optimizer in more depth than any other source I know of.
    HTH -- Mark D Powell --

  • NESTED LOOP or SORT MERGE

    Hi All,
    How can we judge which one is best to use for the query- NESTED LOOP
    - SORT MERGE
    - HASH JOINThanx.. Ratan

    Hi...
    For Nested Loop Joins:
    Nested loop joins are useful when small subsets of data are being joined and if the join condition is an efficient way of accessing the second table.
    It is very important to ensure that the inner table is driven from (dependent on) the outer table. If the inner table's access path is independent of the outer table, then the same rows are retrieved for every iteration of the outer loop, degrading performance considerably. In such cases, hash joins joining the two independent row sources perform better.
    For Hash Join:
    Hash joins are used for joining large data sets. The optimizer uses the smaller of two tables or data sources to build a hash table on the join key in memory. It then scans the larger table, probing the hash table to find the joined rows.
    For Sort Merge Joins:
    Sort merge joins can be used to join rows from two independent sources. Hash joins generally perform better than sort merge joins. On the other hand, sort merge joins can perform better than hash joins if both of the following conditions exist:
    The row sources are sorted already.
    A sort operation does not have to be done.
    However, if a sort merge join involves choosing a slower access method (an index scan as opposed to a full table scan), then the benefit of using a sort merge might be lost.
    Sort merge joins are useful when the join condition between two tables is an inequality condition (but not a nonequality) like <, <=, >, or >=. Sort merge joins perform better than nested loop joins for large data sets. You cannot use hash joins unless there is an equality condition.
    In a merge join, there is no concept of a driving table. The join consists of two steps:
    Sort join operation: Both the inputs are sorted on the join key.
    Merge join operation: The sorted lists are merged together.
    If the input is already sorted by the join column, then a sort join operation is not performed for that row source.

  • Nested loop, merge join and harsh join

    Can any one tell me the difference/relationship between nested loop, harsh join and merge join...Thanx

    Check Oracle Performance Tuning Guide
    13.6 Understanding Joins
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/optimops.htm#i51523

  • Is merge join cartesian more cpu intensibe than nested loop ?

    Hi,
    just wonderning which access method is more cpu intensive , lets supposed we got 2 the same row sources and doing joing via merge join cartesian and next case is nested loop .
    I know NL can be cpu intensive because of tight loop access , but what abour MJC ?
    I can see bufferd sort but not sure is that cpu friendly ?
    Regards
    GregG

    Hi,
    I think in your case it's more accurate to compare a NESTED LOOP (NL) to a MERGE JOIN (MJ), because CARTESIAN MERGE JOIN is a rather special case of MJ.
    Merge join sorts its inputs before combining them, and it could be efficient when one or both of inputs are already sorted.
    Regarding your question (which is more CPU intensive):
    1) if MERGE JOIN involves disk spills, then CPU is probably irrelevant, because disk operations are much more expensive
    2) the amount of work to combine rowsources via a MJ depends on how well they are aligned with respect to each other, so I don't think it can be expressed via a simple formula.
    For nested loops, the situation is much more simple: you don't need to do any special work do combine the rowsource, so the cost is just the sum of the cost acquiring the outer rowsource plus the number of iterations times the cost of one iteration. If the data is read from disk, then CPU probably won't matter much, if most of reads are logical ones than CPU becomes of a factor (it's hard to tell how much work CPU will have to do per one logical read because there are two many factors here -- how many columns are accessed, how they are located within the block, are there any expensive math functions applied to any of them etc.)
    Best regards,
    Nikolay

  • Merge possible from nested table?

    I recently have started using the merge command for some of our standard 'upsert' procedures. The old design for inserts was coming from a Java web service that would send over a flat file, which in turn the Java would call an insert procedure n times while in a loop, and on each call the procedure would perform a single insert.
    As you are probably already shaking your head, I realize this makes way too many database calls to be scalable and is poor design. So I now have modified the procedure to take a nested table as the input and I loop through the nested table and do all the inserts in a single procedure call. I now want to take advantage of bulk binding. I know there is the FORALL command, but I figured there was a way to do this with MERGE since the procedure does an update if a match is found instead. I didn't know if there is any syntax to do this as the oracle docs state the USING clause can be a table, view or subquery.
    I am using Oracle 10gR2 and SQL Developer 3.x. This was my attempt:
    CREATE TABLE merge_table
        t_id     NUMBER(9,0),
        t_desc   VARCHAR2(100)
    CREATE OR REPLACE TYPE merge_type IS OBJECT
        type_id     NUMBER(9,0),
        type_desc   VARCHAR2(100)
    CREATE OR REPLACE TYPE merge_list IS TABLE OF merge_type;
    CREATE OR REPLACE PROCEDURE my_merge_proc(p_records IN merge_list)
    AS
    BEGIN
        MERGE INTO merge_table MT
        USING
            SELECT
                p_records.type_id,
                p_records.type_desc
            FROM DUAL
        ) D           
        ON
            MT.t_id = p_records.type_id
        WHEN MATCHED THEN UPDATE
        SET
            t_id   = p_records.type_id,
            t_desc = p_records.type_desc
        WHEN NOT MATCHED THEN INSERT
            t_id,
            t_desc
        VALUES
            p_records.type_id,
            p_records.type_desc
    END;
    show error
    CLEAR SCREEN
    SET SERVEROUTPUT ON
    -- test script to execute procedure
    DECLARE
        l_list merge_list := merge_list();
        l_size NUMBER(9,0) := 5;
    BEGIN
        l_list.EXTEND(l_size);
        FOR i IN 1 .. l_size
        LOOP
            l_list(i) := merge_type(i,'desc ' || TO_CHAR(i));
        END LOOP;
        my_merge_proc(p_records => l_list);
    END;
    PROCEDURE my_merge_proc compiled
    Warning: execution completed with warning
    10/23          PLS-00302: component 'TYPE_DESC' must be declared
    10/13          PL/SQL: ORA-00904: "P_RECORDS"."TYPE_DESC": invalid identifier
    5/5            PL/SQL: SQL Statement ignoredI know the syntax isn't correct. How do I fix this or is it even possible to do what I am trying to do?

    Ironically, after thinking about this for another 5 minutes the answer finally came to me after I had given up hope:
    CREATE OR REPLACE PROCEDURE my_merge_proc(p_records IN merge_list)
    AS
    BEGIN
        MERGE INTO merge_table MT
        USING
            SELECT
                type_id,
                type_desc
            FROM TABLE(p_records)   -- change here
        ) R           
        ON
            MT.t_id = R.type_id
        WHEN MATCHED THEN UPDATE
        SET
            --MT.t_id   = R.type_id,  -- cannot update the same column from on clause
            MT.t_desc = R.type_desc
        WHEN NOT MATCHED THEN INSERT
            MT.t_id,
            MT.t_desc
        VALUES
            R.type_id,
            R.type_desc
    END;
    show error
    PROCEDURE my_merge_proc compiled
    No Errors.
    -- I run my anonymous script block from above
    anonymous block completed
    select * from merge_table;
         T_ID T_DESC                                                                                            
            1 desc 1                                                                                              
            2 desc 2                                                                                              
            3 desc 3                                                                                              
            4 desc 4                                                                                              
            5 desc 5

  • Best way to merge/nest video and audio clips?

    Hi there,
    I really need some advice as I am currently editing a video that has a lot of extra sound effects placed in different places and it pretty much makes the mass of the background sound that has been carefully paired to the clips that I have. My issue here is that I need to place in a voice over and make sure it syncs with the visuals also, but this has made me realise that I will need to loop some parts of the clip to make it work and I dont really want to need to move every single chunk of video clip and it's corresponding sound effect manually by highlighting and then pushing towards the right to make room as I may miss something and it will wipe off some areas that I have spent so long on.
    Is there a way to 'nest' my current clips with my audio clips so I can safely organise this rather than dealing with about 50 layers of audio and clips whilst I move things about to work with the voice over? Please help any advice would be very appreciated!
    Thanks

    Find the sequence you are working on in the Project Panel, drag and drop it on the "New Item" button to create another sequence. Now you have a nested sequence that you can treat as a single clip.

  • Nested tables and multiset operators in Oracle 10g

    Consider the following scenario:
    We have two identical relations R and S defined as:
    CREATE TABLE R(
    a INTEGER,
    b table_type)
    NESTED TABLE b STORE as b_1;
    CREATE TABLE S(
    a INTEGER,
    b table_type)
    NESTED TABLE b STORE as b_2;
    where table_typ is defined as
    CREATE TYPE table_typ AS TABLE OF VARCHAR2(8);
    Suppose we have two instances of R and S, each having one tuple as follows: R(1,table_typ('a','b')) and S(1,table_typ('b','c')).
    I would like to "merge" these two simple instances (e.g., achieve the effect of a simple SELECT * FROM R UNION SELECT * FROM S query) and obtain the following resulting instance: Result(1,table_typ('a','b','c')).
    Would this be possible in Oracle 10g? A simple UNION does not work (I got a "inconsistent datatypes: expected - got SCOTT.TABLE_TYP" error). I also took a look at the MULTISET UNION operator over nested tables available in Oracle 10g, but it doesn't seem to get me anywhere. Any help on this would be greatly appreciated.
    Thank you,
    Laura

    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> CREATE OR REPLACE TYPE table_type AS TABLE OF VARCHAR2 (8);
      2  /
    Type created.
    SQL> CREATE TABLE r(
      2    a INTEGER,
      3    b table_type)
      4    NESTED TABLE b STORE as b_1;
    Table created.
    SQL> CREATE TABLE s(
      2    a INTEGER,
      3    b table_type)
      4    NESTED TABLE b STORE as b_2;
    Table created.
    SQL> INSERT INTO r VALUES (1, table_type ('a', 'b'));
    1 row created.
    SQL> INSERT INTO s VALUES (1, table_type ('b', 'c'));
    1 row created.
    SQL> COLUMN c FORMAT A10;
    SQL> SELECT r.a, r.b MULTISET UNION DISTINCT s.b c
      2  FROM   r, s
      3  WHERE  r.a = s.a;
             A C
             1 TABLE_TYPE('a', 'b', 'c')
    SQL>

  • Nested tables in RTF templates

    Hi,
    I've developed several templates including nested tables(to display parent/child transactions together in a single column group, displaying all the detail transactions but the parent only once), in PDF output this looks fine. However the users want all their output in Excel, this same layout is not picked up by Excel(all column headers for the data in the nested table move to the right, while all the data in the nested table is grouped under a 'merged cell' column header). Output of BI Publisher reports in Excel is generally terrible with a template designed for publishing in PDF, usually I can solve this with a lot of tweaking but haven't found a solution for this issue yet. Has anyone else run into this formatting issue and may have a tip to solve this?
    Regards,
    Arthur

    Hi,
    You need to declare a TYPE object as and then use it in the table structure.
    CREATE TYPE type_emp IS TABLE OF VARCHAR2(15);
    CREATE TABLE Biscuits Company SA
    (company_name COMPANY NOT NULL,
    Company_Owner VARCHAR2(20) NOT NULL)
    NESTED TABLE staff_tab STORE AS type_emp;
    Please see the link for more info.
    http://www.developer.com/db/article.php/10920_3379271_3
    Thanks

  • Is there a way (script option, exporter option) to export a .psd/.psb file with nested layersets to another layered .psd file with a flat layer structure for greater compatibility? (i.e. CS6/CC/CC '14 to CS4 or older?)

    Just looking for a solution short of having to go in and manually delve through hundreds of layers and reorganize the .psd.  There's a lot of vector elements, layer effects and blending modes as well.  It'd be nice to see Adobe include an exporter for older Photoshop versions that can take a newer file and regenerate it making whatever necessary changes to maintain compatibility across older Photoshop versions and even for cross-compatibility.  I know that's not necessarily in their best interests for additional sales, but it is in the end-user's best interests when they collaborate with others across various file and application formats.

    The first problem here is Layer Styles, if I understand what you are trying to do correctly. You can have arbitrarily nested Layer Sets/Groups (each with its own Layer Style) that contain Layers with their own Layer Styles. This means that for a nested layer, you would have to take it's Layer Style and merge it with the containing Group(s) layer styles in the correct order. Then you have to do the same thing with Layer/Vector Masks and whatever else is involved. It's a non-trivial piece of work. It's not intractable, however.
    There is also the problem that some parts of the Layer Styles are binary blobs that make merging at the JS level impossible.
    If someone has implemented this, I would love to see the implementation.
    What you actually need may be a lot less complicated than the general case. If so, you may be able to find someone to help you out.
    I wish you luck.

  • Update Nested Table Problem

    Hi All,
    I have a update problem in nested table.
    Below is my query:
    CREATE OR REPLACE TYPE TRACER.SEARCH_DATA AS TABLE OF VARCHAR2(20);
    UPDATE TRACER_SEARCH_SCHEDULE_LOT_NUM
    SET NOT_FOUND_SOR_LOT_NUM = SEARCH_DATA(
    SELECT
    COLUMN_VALUE
    FROM
    TABLE (SELECT SORTING_LOT_NUMBER FROM TRACER_SEARCH_SCHEDULE_LOT_NUM WHERE JOB_ID = 8)
    WHERE
    TRIM(COLUMN_VALUE) NOT IN (SELECT DISTINCT (SORTING_LOT_NUMBER) FROM SEARCH_SCHEDULE_RESULT_LOT_NUM WHERE JOB_ID = 8)
    ) WHERE JOB_ID = 8;
    ORA-00936: missing expression
    or I try as following
    DECLARE
    sor_lot_num_not_found SEARCH_DATA :=
    SEARCH_DATA
    SELECT
    FROM
    TABLE (SELECT SORTING_LOT_NUMBER FROM TRACER_SEARCH_SCHEDULE_LOT_NUM WHERE JOB_ID = 8)
    WHERE
    TRIM(COLUMN_VALUE) NOT IN (SELECT DISTINCT (SORTING_LOT_NUMBER) FROM SEARCH_SCHEDULE_RESULT_LOT_NUM WHERE JOB_ID = 8)
    BEGIN
    UPDATE TRACER_SEARCH_SCHEDULE_LOT_NUM SET NOT_FOUND_SOR_LOT_NUM = sor_lot_num_not_found WHERE JOB_ID = 8;
    END;
    ORA-06550: line 5, column 9:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( ) - + case mod new not null others <an identifier>
    table avg count current exists max min prior sql stddev sum
    variance execute multiset the both leading trailing forall
    merge year month DAY_ hour minute second timezone_hour
    timezone_minute timezone_region timezone_abbr time timestamp
    interval date
    <a string literal with character set specificat
    ORA-06550: line 11, column 5:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    ; for and or group having intersect minus order start union
    where connect
    ORA-06550: line 14, column 4:
    PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
    begin case declare end exception exit for goto if loop mod
    null pragma raise return select update while with
    <an identifier> <a double-quoted d
    I have try on the Select Statement, it work. So is it the way that I assign data from nested table and update method is wrong?
    Edited by: skymonster84 on Mar 8, 2011 5:12 PM

    Hi,
    I think MULTISET operators might interest you.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/operators006.htm
    Not tested :
    UPDATE tracer_search_schedule_lot_num
    SET not_found_sor_lot_num =
          sorting_lot_number
          MULTISET EXCEPT ALL
          CAST(
            MULTISET(
              SELECT distinct sorting_lot_number
              FROM search_schedule_result_lot_num
              WHERE job_id = 8
            AS search_data
    WHERE job_id = 8
    ;

  • To merge data in 1 internal table

    Hi Abap gurus,
    I have some probolem during merging data in internal table . I have four inernal tables and I want to merge data in one final internlal table. Is there any way of doing that without using nested loop ?
    It is urgent .

    Use the APPEND LINES statement.
    APPEND LINES OF: itab1 to final_itab,
                                   itab2 to final_itab,
                                   itab3 to final_itab. ...

Maybe you are looking for