Answers Set operations

Hello All,
In Answers i have used the set operations functionality to union two columns and saved this as a report.
Is there anyway to create a dashboard propmt on this report (basically its a single column contain the results of 2 columns)
Please suggest any idea.
Thanks in advance

Go to the advanced tab of your answers with your union, copy the obiee logical sql.
Then in your dashboard prompt, choose in the show column "set SQL" and copy your sql.
!http://gerardnico.com/wiki/_media/dat/obiee/presentation_service/obiee_set_variable_dashboard_prompt.jpg?cache=!
Edited by: gerardnico on Jul 8, 2009 7:02 PM, add photo

Similar Messages

  • Problem in Adhoc Query's set operation functionality.

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

    Hi Experts,
    I am facing problem executing Adhoc Query's set operation functionality.
    In Selection Tab, following operations are performed :-
    Execute a query and mark it as 'Set A'.(Say Hit list = X)
    Execute another query and mark it as 'Set B'.(Say Hit list = Y)
    In Set operation Tab, following operations are performed :-:-
    Carry out an Operations 'Set A minus Set B'.
    which results in Resulting Set = Z.
    Transfer the resulting set 'in hit list' and press the copy resulting set button.
    In Selection Tab, Hit list is populated with Z.
    And when output button is pressed, I get to see 'Y' list and not 'Z' list.
    Kindly help.
    Thanks.
    Yogesh

  • Set operations in AdHoc Query - user settings

    Hi
    I am checking out the Set operations in AdHoc Query.  The documentation says you should save the setting "Set operations shown" as a user setting.  Could anyone advise me where this is set?  I can't find a parameter for it, and can't find it in the regular settings.
    Any help appreciated.
    Kirsten

    The save is automatic upon exiting Ad Hoc query.  Once you do "Show Set Operations", work on a query, save and exit, the next time you open Ad Hoc query, Set Operations tab is displayed by default.
    Regards,
    RN.

  • Set operations & tables with different columns

    I have a problem. I have 3 tables - Countries, Locations & Departments. I want to output the country_id and country_name from the countries tables for countries that have no departments. Locations has country_id and location_id columns and departments has location_id and department_id columns. All is in Database 11g. I can produce a table which gives me the locations with departments or without departments as follows:
    select location_id from locations intersect select location_id from departments;
    This gives me a list of locations with departments. Conversely I can get a list of locations without departments as follows:
    select location_id from locations minus select location_id from departments;
    However, to combine this output with the countries table I need to produce country_id in the output. However, when I try to add country_id to my code from above as follows:
    select country_id, location_id from locations intersect select to_char(null), location_id from departments;
    I get no rows found. I understand why. There is no intersection between country_id in locations and the null output from departments (where there is no country_id column). Alternatively, if I try as follow:
    select country_id, location_id from locations minus select to_char(null), location_id from departments;
    I get rows with every country_id whether they have departments or not. Again, I understand why. I am essentially subtracting nothing (the to_char(null) from departments) from the country_id column in locations and getting the entire country_id column as output.
    How can I use set operations to produce the country_id column? I also do not want to show the location_id problem.
    This problem is repeated when I try for the final country_id, country_name final output. The countries table has these columns. However, the locations table does not have the country_name column. It only has the country_id column. So a query such as this one:
    select country_id, country_name from countries intersect country_id, to_char(null) from locations;
    presents me with the same problem as above. The country_id column intersects nicely, but the country_name file does not intersect as it does not exist in the locations table. Again, how can I use set operations to produce the country_id and country_name columns.

    Hi,
    the method I outlined for you above should be fine. It doesn't matter that there are one-to-many relationships which may cause repeated output rows; set operations (except for UNION ALL ) always return distinct rows.
    Can you do a query on the countries table, that shows all countries?
    Can you do a query involving all 3 tables inner-joined, that shows the countries that are related to locations and departments? (Repeated rows are okay.)
    Then you can do a MINUS, to get only the countries that are not related to departments.
    If you get stuck, post a little sample data (CREATE TABLE and INSERT statements), the results you want from tha data, your best attemptat a query, and a description of the problem (including the full error message, if any).

  • AdHoc Set Query - set operations - practical use

    Hi
    I am writing a user manual about AdHoc Query - including Set operations. I am looking for good examples when to use the different operations.  A-B is easy.  Example - 'give me all employees that are not on maternity leave'.  But I am struggling with good practical examples on when to use Union and Intersection.  It needs to be examples that cannot be covered by selection criteria in one single query.
    Does anyone have any good practical examples?  Any help appreciated.
    Kirsten

    Hi Kirsten,
    I use Set Operations many times to find individuals who do not have a certain infotype or plan.  Example:  Find all retirees who are not enrolled in a medical plan.  Group A = All retirees;
    Group B = All retirees in a medical plan.  A - B = Retirees with no medical plan coverage. 
    Ad Hoc Query does not allow you to use "Or" logic in selection with different criteria.  A Union could be used for this.  An example would be employees who are in pay Grade 1 - 5 (Group A) or earn less than $50,000 per year (Group B).  Intersection would be those in Grades 1 - 5 and earn less than $50,000 per year. 
    Paul

  • How to activate Show Set Operations in Ad Hoc query

    When I go into ad hoc query using an infoset I created the Extras > Show Set Operations and Switch off object selection functions are greyed out and I cannot select them.  On another infoset these functions are available for selection.
    Is there some setting in the info set creation that allows these function to be available for selection?

    closing question

  • Finding duplicates:Minus set operator in dealing with internal tables

    Dear experts,
    I am newbie to ABAP developement,i have been given an assignment to find the duplicate list of vendors in lfa table.
    Now duplicate list doesnot means that text tokens will be just exact to conclude them as duplicate ,it could also be like
    1111 Vendor ABC
    1222 ABC Vendor
    If anybody has clue ,how to work on such a problem ,plz come forward.
    Right now i just tried initially how to find exact duplicates,i found  on change command,it do works.
    Then i am trying a new way which should just do the same thing.
    I did as per this algorithm
    1.Compute wholesome list in one internal table itab1
    2.Used delete adjacent duplicates in itab2.
    3.I feel itab3=itab1-itab2 will contain all duplicates in itab3.
    Can anyone give me a hint.How can i do A-B ?.

    Hi Arul,
    There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
    Best regards, Sergei

  • Mapping - split followed by set operation

    Hi I'm trying to set up a mapping to use as part of testing my warehouse and need some help.
    Overview
    ======
    I have a number of different databases that combine through to my operational data store. One verification of our mappings is a simple check of record counts, source table vs target.
    Because table names differ between source and target I have loaded (from a flat file) a translation table that maps one table name to another.
    I have external SQL scripts that run on a scheduled basis to capture table names, record counts and date of last update from the system tables of four of my source databases and my target database. (soon I'll need to try and replace these with OWB scripts)
    I am trying to build a mapping to conform these so I end up with a single fact listing target table, record count, update date, source table, source environment, record count, update date.
    I have taken my statistics on the target database, outer Joined it to the translation table (not all target tables have matching translation table records)
    Then split the result set by target environment (and remainder)
    Then I join each result set to the statistics for the appropriate source.
    Next I am using a set operation to union all the results back to my conformed result.
    My Problem
    =========
    Those tables in the target database that do not correspond to a table in one of the four sources cause a problem. (they are either summary facts, flat files loaded or sourced from other databases I have not got statistics on yet)
    I can’t just link from the split’s output set to the set operation because the other joins have added extra fields for number of records in the source. The documentation is very clear that the same fields must exist in the same order and datatype.
    I have been trying to work out which mapping operation/s will produce the equivalent of SQL like “select col1, col2, null, sysdate, null from mytable”
    Hmm as I type this up I think another alternative may be to output extra fields in the split (so it looks like the dataset after the join) but not to pass these fields on in the join for sets for specific environments. I’ll try that alternative but would still like help with which mapping operator I could have used.

    Can I have a little bit more technical information : A small exmaple would be very helpful.
    Regards
    -Arnab

  • Oracle 10g - Set Operator Union Causing Timeout Network problem

    Purpose is to get all of the customers not contacted given a starting date and current date(sysdate). The problem is a timeout issue because the query is inefficient. Example: A salesman has 6,946 rows returned from the cust table where his salesid =1163. Then the inner query:
    ‘SELECT count(Customer_ID) FROM cust_info WHERE info_type_id = 32’
    returns 225505 rows just based on this info_type_record.
    Next, ‘SELECT c.customer_id
      FROM customer c,
        event e
      WHERE c.salesperson_id = 1163
      AND e.eventdate BETWEEN '10-Feb-2010' AND TRUNC(SYSDATE)
      AND c.customer_id = e.customer_id
      GROUP BY c.customer_id’
    Returns 231 rows
    Finally, ‘SELECT c.customer_id
      FROM customer c,
        note n
      WHERE c.salesperson_id = 1163
      AND n.created_date_time BETWEEN '10-Feb-2010' AND TRUNC(SYSDATE)
      AND n.note_type_id IN (1,3,4)
      AND c.customer_id   = n.pk_id
      AND n.table_name    = 'CUSTOMER'
      GROUP BY c.customer_id’
    Returns 399 rows.
    How can I improve the structure of this query(see bottom)? The following is a sample data structure:
      CREATE TABLE "CUST "
       (     "CUST_ID" NUMBER,
         "SSN" VARCHAR2(9),
                      "SSN_TYP" NUMBER(1,0),
         "CREATED_DTE_TME" DATE,
         "FULLNAME" VARCHAR2(110),
         "F_NAME" VARCHAR2(35),
         "L_NAME" VARCHAR2(40),
         "BDTE" DATE,
         "DCEASED_DTE" DATE,
         "SALES_ID" NUMBER DEFAULT NULL,
         "BRNCH_ID" NUMBER,
         "HOME_BRNCH_ID" NUMBER,
         "TTL_ASSETS" NUMBER,
         "TTL_ASSETS_DTE" DATE,
         "NO_MAILINGS" NUMBER(1,0),
         "NO_CALLS" NUMBER(1,0) ) ;
      CREATE TABLE "CUST_INFO"
       (     "CUST_INFO_ID" NUMBER,
         "CUST_ID" NUMBER,
         "INFO_TYPE_ID" NUMBER ) ;
    CREATE TABLE "EVENT"
       (     "EVENT_ID" NUMBER,
         "EVENTDATE" DATE,
         "CUST_ID" NUMBER,
         "SALES_ID" NUMBER,     
                      "EVENT_INFO" VARCHAR2(4000)  )
    ENABLE ROW MOVEMENT ;
    CREATE TABLE “NOTE"
       (     "NOTE_ID" NUMBER,
         "NOTE_TYPE_ID" NUMBER DEFAULT 0,
         "TABLE_NAME" VARCHAR2(50),
         "PK_ID" NUMBER,
         "CREATED_DTE_TME" DATE ) ;
    INSERT INTO CUST VALUES(20151,'009529433',1,'01-MAY-5','FRENCH','D','M','01-DEC-01', '05-JUN-05',1163,
    NULL,0,NULL,NULL,NULL,NULL)
    INSERT INTO CUST_INFO VALUES (15,1001,32)
    INSERT INTO EVENT VALUES (5,'05-MAY-05',1001,1163,'NONE')
    INSERT INTO NOTE VALUES (100,2,'CUST',1001,TRUNC(SYSDATE))
    SELECT CUST.CUST_ID,
      SSN,
      F_NAME,
      L_NAME,
      CREATED_DTE_TME ,
      TTL_ASSETS,
      BRNCH_ID,
      SALES_ID ,
      BDTE,
      SSN_TYP,
      FULLNAME,
      Home_BRNCH_ID ,
      No_Mailings,
      No_Calls,
      DCEASED_DTE,
      TTL_ASSETS_DTE
    FROM CUST
    WHERE SALES_ID          = 1163
    AND CUST.CUST_ID NOT IN (
      (SELECT CUST_ID FROM cust_info WHERE info_type_id = 32
    UNION
      (SELECT c.CUST_ID
      FROM CUST c,
        event e
      WHERE c.SALES_ID = 1163
      AND e.eventdate BETWEEN '10-Feb-2010' AND TRUNC(SYSDATE)
      AND c.CUST_ID = e.CUST_ID
      GROUP BY c.CUST_ID
    UNION
      (SELECT c.CUST_ID
      FROM CUST c,
        note n
      WHERE c.SALES_ID = 1163
      AND n.CREATED_DTE_TME BETWEEN '10-Feb-2010' AND TRUNC(SYSDATE)
      AND n.note_type_id IN (1,3,4)
      AND c.CUST_ID   = n.pk_id
      AND n.table_name    = 'CUST'
      GROUP BY c.CUST_ID
    AND CUST.ssn           IS NOT NULL
    AND CUST.DCEASED_DTE IS NULL
    {code}
    Any guidance is appreciated!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    It’s not problem with SET operator. while you are using date field in where clause, U must use date conversion function, otherwise it will stuck there
    Here is the right sql, U can try with this
    SELECT cust.cust_id, ssn, f_name, l_name, created_dte_tme, ttl_assets,
    brnch_id, sales_id, bdte, ssn_typ, fullname, home_brnch_id,
    no_mailings, no_calls, dceased_dte, ttl_assets_dte
    FROM cust
    WHERE sales_id = 1163
    AND cust.cust_id NOT IN (
    (SELECT cust_id
    FROM cust_info
    WHERE info_type_id = 32)
    UNION
    ((SELECT c.cust_id
    FROM cust c, event e
    WHERE c.sales_id = 1163
    AND e.eventdate BETWEEN to_date('10-Feb-2010','dd-mon-rrrr') AND TRUNC (SYSDATE)
    AND c.cust_id = e.cust_id
    GROUP BY c.cust_id)
    UNION
    (SELECT c.cust_id
    FROM cust c, note n
    WHERE c.sales_id = 1163
    AND n.created_dte_tme BETWEEN to_date('10-Feb-2010','dd-mon-rrrr') AND TRUNC
    (SYSDATE)
    AND n.note_type_id IN (1, 3, 4)
    AND c.cust_id = n.pk_id
    AND n.table_name = 'CUST'
    GROUP BY c.cust_id)))
    AND cust.ssn IS NOT NULL
    AND cust.dceased_dte IS NULL;

  • How do set operation timeout in tomcat server?

    hi all
    suppose i have one endless loop program(jsp) that program run under tomcat server,
    so it's keep on runing in tomcat server.
    i want, after some time the server send error message like operation timeout.
    how do set operation timeout in tomcat server?
    if anybody know help me.
    my mail id [email protected]

    Well, the server.xml file has connection time outs, but that is for idle time, I think... I'm not sure what would happen in a loop... , especially if you are sending some data back to the client in each iteration. Generally you shouldn't be starting a loop that will really run forever. Maybe have some type of counter to break out if something hasn't occurred within x iterations, or create a separate thread that can sleep for x seconds and set a flag to break the loop after that time.

  • RFE Proposal Set Operations - RFC

    Greetings, this is a proposal for a Request for Enhancement in the JDK. It
    is posted here for the review and comment. Basically an RFC on a RFE. =)
    Please indicate your comments on the matter.
    The proposal is to have a set of operations for perfomring Non-destructive
    mathematical set operations on collections. Additionally, the addition of
    set operations to rename the old operations int java.util.Collection
    interface to names that are mathematically accurate; so that
    removeAll(Collection c) would have an alias of difference(Collection c) and
    retainAll(Collection c) would have a alias of intersection(Collection c).
    The following methods would be added to the java.util.Collections class.
    * Performs the non-descturctive union of two collections.
    * The resulting collection is the union of the two collections with no
    duplicates.
    * @author Robert Simmons Jr.
    * @param a The first collection of objects.
    * @param b The second collection of objects.
    * @return The collection wise union of and b.
    public final static Collection collectionUnion(final Collection a, final
    Collection b) {
      Collection results = new HashSet(a);
      Iterator iter = b.iterator();
      while (iter.hasNext())
      results.add(iter.next());
      return results;
    * Performs the intersection of two collections.
    * The resulting collection is the intersection of the two collections with
    no duplicates.
    * @author Robert Simmons Jr.
    * @param a The first collection of objects.
    * @param b The second collection of objects.
    * @return The collection wise intersection of a and b.
    public final static Collection collectionIntersection(final Collection a,
    final Collection b) {
      Collection results = new HashSet();
      Iterator iter = a.iterator();
      Object element = null;
      while (iter.hasNext()) {
        element = iter.next();
        if (b.contains(element)) results.add(element);
      return results;
    * Performs the difference of two collections.
    * Removes all elements from a that appear in b.
    * @author Robert Simmons Jr.
    * @param a The first collection of objects.
    * @param b The second collection of objects.
    * @return The collection wise difference of b elements removed from a.
    public final static Collection collectionDifference(final Collection a,
    final Collection b) {
      Collection results = new HashSet(a);
      Iterator iter = b.iterator();
      while (iter.hasNext())
        results.remove(iter.next());
      return results;
    * Performs the XOR union of two collections.
    * The resulting collection is the union of the two collections with objects
    that appear in
    * a and b left out.
    * @author Robert Simmons Jr.
    * @param a The first collection of objects.
    * @param b The second collection of objects.
    * @return The collection wise union of a and b excluding any objects that
    appear in both a and b.
    public final static Collection collectionXORUnion(final Collection a, final
    Collection b) {
      Collection results = new HashSet(a);
      Iterator iter = b.iterator();
      Object element = null;
      while (iter.hasNext()) {
        element = iter.next();
        if (!(b.contains(element))) results.add(element);
      return results;
    * Performs the union of two maps.
    * The resulting map is the union of the two maps with no duplicates.
    * When working with set operations on a map, the set is assumed to be the
    key set. For
    * this reason, if both sets have the same key but different values then the
    value from
    * set b will beused as the value.
    * @author Robert Simmons Jr.
    * @param a The first map of objects.
    * @param b The second map of objects.
    * @return The map wise union of and b.
    public final static Map mapUnion(final Map a, final Map b) {
      Map results = new HashMap(a);
      Iterator iter = b.keySet().iterator();
      Object key = null;
      while (iter.hasNext()) {
        key = iter.next();
        results.put(key, b.get(key));
      return results;
    * Performs the intersection of two maps.
    * The resulting map is the intersection of the two maps with no duplicates.
    * When working with set operations on a map, the set is assumed to be the
    key set. For
    * this reason, if both sets have the same key but different values then the
    value from
    * set b will beused as the value.
    * @author Robert Simmons Jr.
    * @param a The first map of objects.
    * @param b The second map of objects.
    * @return The map wise intersection of a and b.
    public final static Map mapIntersection(final Map a, final Map b) {
      Map results = new HashMap();
      Iterator iter = a.keySet().iterator();
      Set bKeys = b.keySet();
      Object key = null;
      while (iter.hasNext()) {
        key = iter.next();
        if (bKeys.contains(key)) results.put(key, b.get(key));
      return results;
    * Performs the difference of two maps.
    * Removes all elements from a that appear in b.
    * In this case, the set is determined to be the set of keys. The set of
    keys from
    * b will be used to remove keys from a.
    * @author Robert Simmons Jr.
    * @param a The first map of objects.
    * @param b The second map of objects.
    * @return The map wise difference of b elements removed from a.
    public final static Map mapDifference(final Map a, final Map b) {
      Map results = new HashMap(a);
      Iterator iter = b.keySet().iterator();
      while (iter.hasNext())
      results.remove(iter.next());
      return results;
    * Performs the XOR union of two maps.
    * The resulting map is the union of the two maps with objects that appear
    in
    * a and b left out.
    * When working with set operations on a map, the set is assumed to be the
    key set. For
    * this reason, if both sets have the same key but different values then the
    value from
    * set b will beused as the value.
    * @author Robert Simmons Jr.
    * @param a The first map of objects.
    * @param b The second map of objects.
    * @return The map wise union of a and b excluding any objects that appear
    in both a and b.
    public final static Map mapXORUnion(final Map a, final Map b) {
      Map results = new HashMap();
      Iterator iter = a.keySet().iterator();
      Set bKeys = b.keySet();
      Object key = null;
      while (iter.hasNext()) {
        key = iter.next();
        if (!(bKeys.contains(key))) results.put(key, b.get(key));
      return results;
    }Transcript of mail session with Sun java developer after bug submission:
    Hi Robert Simmons Jr.,
    Thank you for the feedback.
    The method names in java.util.Set conform to the parent interface,
    java.util.Collection. As for the destruction situation, returning a new set
    also would involve creating and populating a new set.
    If you would like to pursue this Request for Feature Enhancement (RFE)
    further,
    I would suggest that you first post this idea to a newsgroup and request
    comment from other Java developers. The issues that we have discussed are a
    good starting point.
    You can view a list of Java newsgroups at:
    http://java.sun.com/aboutJava/newsgroups.html
    Based on the responses, please feel free to submit a new RFE containing a
    link to the newsgroup. Thank you for your time.
    Regards,
    Jonathan
    "Simmons, Robert" wrote:
    >
    I understand your reply now. However I put it to you that the names ofthese
    operations are HORRIBLY named. They should be named according to the
    mathematical operations. Further, they are destructive to the set being
    checked and I dont want that. The set operations should give me back a set
    and not destroy the current set. If they destroy the current set then Ihave
    to spend time copying the thing before I run the set operation which is
    truly not performant. Do an intersection of 400,000 elements with anotherfo
    300,000 elements and you have to first copy one and then the retain all
    method has to iterate through the entire set. This is very bad logic. Inthe
    code I gave you, you have to only iterate through the set and not copy it.>
    ----------------- Original Bug Report-------------------
    category : java
    release : 1.4
    subcategory : classes_util
    type : rfe
    synopsis : java.util.Collections Class Should Implement Logical Set
    Operations
    description : FULL PRODUCT VERSION :
    This issue is pertinent to all java versions including the new 1.4 version.
    FULL OPERATING SYSTEM VERSION : Occurs in all operating
    Systems.
    ADDITIONAL OPERATING SYSTEMS : NA
    A DESCRIPTION OF THE PROBLEM :
    The java.util.Collections class is a class that is used to
    manipulate sets and change them into various forms. Missing
    from this is a feature that would define set operations,
    such as Union, Intersection, and so on on the sets. This
    would be extremely beneficial. I have written an extension
    to this class that does just that and would like to submit
    it for donation. All I ask is that the javadoc tag naming
    me as author be retained.
    This bug can be reproduced always.
    ---------- BEGIN SOURCE ----------
    <!-- snip source .. see above -->
    ---------- END SOURCE ----------
    CUSTOMER WORKAROUND :
    Writing your own classes to do this, however it is so basic
    that it should be in there.
    workaround :
    suggested_val :
    cust_name : Robert Simmons Jr.
    cust_email : [email protected]
    jdcid : Derisor (old one was gnuish)
    keyword : webbug
    company : Ingeniums Pharmaceuticals AG
    hardware : x86
    OSversion : Linux
    bugtraqID : 0
    dateCreated : 2002-03-11 13:31:18.3
    dateEvaluated : 2002-04-11 18:08:17.247
    Robert Simmons Jr.
    Senior Software Engineer
    Ingenium Pharmaceuticals, Munich Germany.
    Robert Simmons Jr.
    Senior Software Engineer
    Ingenium Pharmaceuticals, Munich Germany.
    Robert Simmons Jr.
    Senior Software Engineer
    Ingenium Pharmaceuticals, Munich Germany.

    Additional Bump. Seeking comments.

  • Doing set operations on Result Sets

    Hi all
    I am trying to make a table synchronization application.As far as specs go, There can be two similar tables in two different databases I will run a query on both the databases which will fetch me two separate resultsets, now I want to try doing set operations on this result sets like union, intersection etc. Is it at all possible? Is there a way to compare two resultsets efficiently? Can I some how tell my two resultsets to get the records which are not the same in both?

    Not efficiently, no.

  • Set operations on Internal tables.

    Hi,
      Last week i had to enhance a program that has a internal table with some records. I need to find populate a table with the records in the internal table. But before populating i must find out the difference in the records (i.e) the extra records in the internal table compared with the records in the database table and then i have to append those records in the internal table again and then insert the internal table records into database table. while doing it i need to create another internal table with records in database table and then loop at it to find the extra records and rest of the logic goes on.
      At this point of time it clicked in my mind "WHY DON'T WE HAVE SET OPERATIONS ON TWO INTERNAL TABELS(UNION, INTERSECTION, MINUS)".
      Now i am doing some study how to implemnt it. Before that i want to find out whether that functionality exists in ABAP or anybody of youo gurus have done similar work on it.
    Pls help me in proceeding with my work.

    Hi Arul,
    There is no special aided SET operations upon internal tables in ABAP. Concerning your particular task I would say that you can try INSERT statement for each record in your internal table without preliminary comparing them with DB table. If there is a record in DB table with the same key then sy-subrc after INSERT will be non zero (actually 4) and no real insert would occur. So, only those records would be inserted which have no counterpart in DB table.
    Best regards, Sergei

  • Does EDQ support MINUS set operation

    Hi
    I would like to implement a MINUS set operation using EDQ - is this possible in EDQ?
    For example, I have duplicate records in my input set and I can use the group and merge processor to generate the unique records (btw, it selects the lowest id of the duplicate records) but I want to output all the other duplicated records (that were eliminated as part of group and merge processor) as part of separate output list so some cleanup action  can be taken on those records.
    For eg for following input set:
    id  code
    1   code1
    2   code 1
    3   code 2
    The output of group and merge (merge is done by code) is
    id code
    1  code1
    What I want is to store the following output (that was discarded by group and merge) for cleanup actions later - how I can achieve this using EDQ?
    id code
    2 code1
    Thank you for your time.
    Thanks,
    Priya

    Thanks Mike. Good to know about other configurable options under Merge BUT I'm still not sure how can I get a list of "other" duplicated values - other than the one that is the output of Group and Merge processor.
    Once again, my input data set is something like
    <id>  <code>
    1       code1
    2       code 1
    3       code 2
    The output of group and merge (merge is done by code and it uses the default to select the lowest id or first one available) is
    <id> <code>
    1      code1
    (The above default behavior for the Group and merge is fine for our example.
    BUT, What I want is to store the following output (that was discarded by group and merge) for cleanup actions later - how I can achieve this using EDQ?
    <id> <code>
    2      code1
    (As you notice, code1 is duplicated twice in the input data set and I want to write to the output the other record - meaning id=2 in the above example)
    Thanks,
    Priya

  • Set operations usecase

    hi,
    I am a new bee and would like to understand the use of SET operations ( UNION, UNIONALL, MINUS, INTERSECTION) can't we do the same with the use of JOINS ? Am I wrong ? please correct me....and few examples where there is no alternate except using SET operations will help me to understand the thing more clearly...
    Thanks and regards
    mahesh.

    Documentation at http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries004.htm#i2054381 might prove useful.

Maybe you are looking for

  • Cs5.5 design standard windows - change to mac version?

    Hi, i have the cs 5.5 design standard for windows, is it possible to change this version to an macintosh version? thx

  • Service item should not post to stock

    Dear Experts, I have the following scenario. I have a service material (DIEN). And created a PO with Account assignment M with SO. I have done the GR, accounting entries are posted as: + KBS --> CoGS - WRX --> GR/IR Clearing Account entries are corre

  • How to query requirements of an sccm 2012 application

    Dear all I have some problem to create an OSLanguage or Device_OSLanguage Requirement using powershell script it seems that the value passed to the script is not assume by sccm because the record is not availble on the console i tryed with 1033 , en-

  • Need help with preloder in CS5

    i have been trying to find a propper tutorial on how to make a preloder on CS5 but the ones i found were for CS4 and did not work. can someome help?

  • Reporting an area with long-time no signal?

    I've lived in an area for 16 months, and a road that I use regularly, that is a major north-south thoroughfare with many stores, has been consistently  lacking enough signal to make calls through Verizon or to connect with a Verizon broadband wireles