Comparing Many To Many Fields

Hello,
I basically have two tables, each table has three fields. I want to be able to select any field = to any field.
So if table 1 has fields A, B, C and table 2 has D, E, F.
A can match to D
A can match to E
A can match to F
B can match to D
B can match to E
B can match to F
C can match to D
C can match to E
C can match to F
any ideas on how I can find these matches with one select statement? Its ALOT of rows and and I would prefer to not have 9 table scans.

You can do using ANY clause or IN clause
SELECT A.*, b.*
  FROM table1 A, table2 b
WHERE (A.col1 = ANY (b.col1, b.col2, b.col3)
     OR  A.col2 = ANY (b.col1, b.col2, b.col3)
     OR  A.col3 = ANY (b.col1, b.col2, b.col3))
OR
SELECT A.*, b.*
  FROM table1 A, table2 b
WHERE (A.col1 IN (b.col1, b.col2, b.col3)
     OR  A.col2 IN (b.col1, b.col2, b.col3)
     OR  A.col3 IN (b.col1, b.col2, b.col3))G.

Similar Messages

  • Query Builder - How to create a link between tables with many fields?

    I have many fields in my tables. When the query builder loads the tables, the tables are expanded to accomodate all the fields. Suppose I want to link Table A's Customer ID (the first field in Table A) wiith Table B's Customer ID (the last field in Table B). How can I do that if the last field in Table B are not visible in the screen?
    Currently, I create a link in Table A's customer with a random field in Table B. Then I edit the link to create a proper condition. Is there a more efficient way to do this?
    Thanks.
    Edited by: woro2006 on Apr 19, 2011 9:40 AM

    Hi woro2006 -
    Easiest way is to grab Table A's title bar & drag Table A down the page until the columns you want to link are visible.
    FYI, there is an outstanding bug
    Bug 10215339: 30EA1: MISSING THE 2.1 RIGHT CLICK OPTIONS ON DATA FIELDS TO CREATE A LINK
    to add a context menu on the field for this. That is, Link {context field} to > {other data sources} > {fields from that source}
    It is being considered for 3.1, but I have no idea where it will end up in the priority queue.
    Brian Jeffries
    SQL Developer Team
    P.S.: Arghh, Unfortunately, I just tried it and the diagram does not auto scroll while you drag, so there is some guess work/repositioning the view involved.
    Logged Bug 12380154 - QUERY BUILDER DIAGRAM DOES NOT AUTO SCROLL WHEN DRAGGING TABLE

  • How define unique constraint on many fields

    Hi,
    is there the possibility in kodo 4.1 to define unique constraint on many
    fields of a persistent class using orm mapping?
    I found the "unique" attribute to define on the field element, but it
    seams that this attribute cannot be define on may fields so that a
    unique combined index can be created.
    Any hint is welcome.
    Thank you very much.
    Daniela

    Unique constraint spanning multiple fields can be specified as follows:
    @Entity
    @Table(name="POBJECT", uniqueConstraints=
    {@UniqueConstraint(columnNames={"FIRST", "LAST"})})
    public class PObject {
    private String first;
    private String last;
    }

  • Too many fields in SBO 2007.

    Hi friends,
    I got an error at the moment to update or delete any account numbers in the areas of "Type of Account" from the G/L Account Determination, in a new company that I'm configuring in SBO 2007.  The error says "too many fields" and I'm worried that error appears later in the production DB on my customer .
    Thanks.
    Daniel

    Hi Marcia,
    Just the error saying "too many fields", and I really want to get out the account or change it for other one.  In 2005 i don't have any problem with that.   In the other hand, the DB is new.
    Thanks.
    Daniel

  • Payload containing "&" in many fields

    hi experts,
    I have got a payload, which has got the character "&" in many fields,and that needs to be replaced with any other caharcter to make the payload suitable to work with in the integration engine.
    please suggest possible solutions to my problem.
    Thank you,
    Shreya.

    Hi Shreya,
       here you can write a simple User defined function in mapping to replace all '&' with character of your choice. Below I have written a simple java code to do so .  The name of the UDF is function. For input "&g&jo" it gives output "ANDgANDjo". You can change the value of string replaceWith with any value of your choice. Then you will obtain the desired output. This UDF has to be put in every mapping to target xml message. 
    public class replaceChars {
         public static String function(String s)
              try
                   int i;
                   char r='&';
                   String replaceWith="AND";
                   String d="";
                   for(i=0;i<s.length();++i)
                        if(s.charAt(i)==r)
                             d+=replaceWith;
                             continue;
                        else
                             d+=s.charAt(i);
                   s=d;
              catch(Exception e)
                   e.printStackTrace();
              return s;
    public static void main(String[] args) {
               String s="&g&jo";
               System.out.println(function(s));
    regards
    Anupam

  • Access 2010 table has too many fields for web database - how to split into two web-compatible tables?

    Hello, 
    I'm in the process of converting an Access 2010 database into a web database and I'm having some trouble. I have a table which has 236 fields, which is more than the 220 field limit for web-compatible tables. I have tried to split this table into two tables
    with a one-to-one relationship, but web tables can only use lookups as relationships. I've tried to connect the tables with a lookup and then synthesize a one-to-one relationship by using data macros but I'm not having much luck.
    I realize that 236 fields is a lot, but it must be set up this way because each field represents a tasks and is a yes/no box to verify that the task has been completed - and the records are different employees for whom which the tasks need to be completed.
    Could someone please help me figure out a way to make this table web compatible?
    Thank you, 
    Ryan

    Hi,
    I found that you've cross post the quesion on our Answer forum, are you satisfiled the reply from there?
    http://answers.microsoft.com/en-us/office/forum/office_2010-access/access-2010-table-has-too-many-fields-for-web/06ee81ea-24ab-48b8-9b8f-0ed08a868bac
    Regards,
    George Zhao
    TechNet Community Support

  • Too many fields (QE - 3018)

    Hello
    I am trying to change something in the document settings and i get the next error:
    Too many fields (QE - 3018)
    Can someone help me?

    Hi,
    I encountered the same error message when I attempted to change the company name in system initialization.  I'm using 2007A PL38.  I followed SAP's recommendation to you by:
    1. Detaching the database in SQL then attaching it.  When I tried to change the company name, I still encountered the error.
    2. I then tried Backing up the database then detach it.  I created a new database then restore the backup.  Still it did not work.
    Please let me know if I did right SAP's recommendation.
    Thank you.
    April

  • OLE or COM Processing error : Too many fields defined

    i have created a excel workbook  format in data integrator and defined the fields in it, when i tried to run a simple job extracting data from spreadsheet ,  i am getting following error OLE or COM Processing error : <Too many fields defined>.
    all i have in the spreadsheet is 18 rows and 35 columns of data, can any help how to solve this problem. i have used query transform for extracting and loading the data in to a table
    Edited by: Rakesh Chittineni on Apr 1, 2010 3:45 AM

    I have Solved the problem my friend suggestion.
    The excel file i was trying to access is from WEBI report which was saved as .xls format and then then made some modifications to the spreadsheet.
    What i did was i deleted the unused columns, i.e my spread sheet has data upto AQ column so i deleted remaining cells.
    and while  defining the  excel file format i selected the option workbook and selected the proper sheet and in the other options i have chosen column range and also check the box ( extended range) now i could over come the error OLE or COM processing error
    Edited by: Rakesh Chittineni on Apr 1, 2010 9:44 PM

  • Update statement with many fields

    Hi,
    I am writing an update statement, in a php page, that is formed by many fields, about 80 fields and I would not specify all the fields, does it exist a way to write the update statement without specify all the fields of the record? (I want update all the fields of a record)
    Thanks, bye bye.

    One question here.
    when we give SET col1 = col1 the update will happen right?
    If my update is going to update 100000 rows of column 1 and column 1 also has an index then wont it be expensive to use such logic insted of just ignoring it from the list.
    Thanks,
    Karthick.

  • How to compare table's date field with dropdown year field

    Hi All,
    I have one requirement to display the selected rows from a database table based on the selection of drop down.
    Here, I have one dropdown of year(like 2009,2010,....) and I have one database table which contains one field with "DATE".
    Now, I want to compare table's DATE field with my dropdown field.
    Problem is that table's DATE field is of type "DATS" and dropdown is of type INTEGER(or) STRING ...
    How to compare this fields?
    Can any one please give me solution for this...!
    Thanks in Advance!

    Hi  sreelakshmi.B,
    try the following:
    DATA lt_dats        TYPE TABLE OF dats.
    DATA l_dat_i        TYPE          i.
    DATA l_dat_c_4(4)   TYPE          c.
    DATA l_dat_c_12(12) TYPE          c.
    DATA l_dats_from    TYPE          dats.
    DATA l_dats_to      TYPE          dats.
    *Move Date from Integer to Char
    l_dat_c_4 = l_dat_i = 2005.
    *Create Date From use in WHERE-Clause
    CONCATENATE '01.01.' l_dat_c_4 INTO l_dat_c_12.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
         EXPORTING
              date_external            = l_dat_c_12
         IMPORTING
              date_internal            = l_dats_from
         EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
    IF sy-subrc <> 0.
    ENDIF.
    *Create Date To use in WHERE-Clause
    CONCATENATE '31.12.' l_dat_c_4 INTO l_dat_c_12.
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
         EXPORTING
              date_external            = l_dat_c_12
         IMPORTING
              date_internal            = l_dats_to
         EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
    IF sy-subrc <> 0.
    ENDIF.
    * Select records in range
    SELECT *
           FROM [DBTAB]
           INTO TABLE [ITAB]
           WHERE [DATE] BETWEEN l_dats_from
                        AND     l_dats_to.
    Regards
    REA

  • How to apply a similar formula to many fields instead of step by step?

    for field “c” the «rude» script is:
    (function() {
       // Get the field values, as numbers
       var v1 = +getField(“a”).value;
       var v2 = +getField(“c”).value;  
       // Perform the calculation
       var result = v1 * 100 \ v2
       // Set the value of this field to the result
       event.value = result;
    But it this form it involves 20 operations...
    It is possible to make a more logical and fast solution?

    Dear try67:
    Firstly, thanks again.
    For some designers with a minimum of knowledge of scripting this seems a very complicated situation.
    We need to help the customer but the investment of time (in this case) sounds excesive.
    For many times you wrote detailed scripts and is a shame always asking the same.
    Perhaps if now you may provide a bibliographical/internet reference for this situation with examples, perhaps we can solve.
    It is like a matrix (?) and perhaps it has a classical formulae. 
    Thank you for all and the point on the errata.

  • Mapping too many fields can cause load on the system?

    Hi Experts,
    I have a question about a mapping .. I am mapping an IDOC to a web-service. The Web-service structure is having the exact same structure as the idoc, but all the fields are not necessary. But the Owner of the web-service is requesting me to map all fields even though it is not required. So my question is ,Will this unwanted field mappings can create an overload/burden on xi system ? I am getting the idoc from an R/3 system  and then I use a BPM to send it to web-service to send the invoice to ORACLE ERP and the response I am getting is used to update the status of IDOC in R/3. Your thoughts on this please..
    Thanks

    Hi,
    normally a standard mapping (I guess graphical) which is 1:1 will definetely not cause any performace issues! Sometimes negative effects are experienced with very complex mappings and many transformations, calculations, value-based actions, etc. Even XSLTs and large mssages could be a problem, because each time the whole message is read. In such cases JAVA mappings may help.
    But your case all should be fine ;o)
    Regards,
    Kai

  • Search in many fields

    Hi, I want to search an string in many text fields at the same time, like MySQL's "Match Against" does. Is there any way to do that without use "like and or" or using many union clauses?.
    Thanks

    Oracle Text and a multi-column datastore.

  • How to search in a table according to search criteria for many fields ??

    Hello all,
    I required any suggestion regarding easy method for searching a table according to search criteria.
    I have 7 dropdown list in the userinterface and user can select 1 dropdown or many according to his choice. After selecting 1 or many dropdown list when he clicks SEARCH button the related records for filled dropdown list should be displayed if present in table. But the problem is that its getting complecated as I have to code for 7 dropdown list. many combinations comes in the way.
    So can anybody  tell me that how to getrid of this complicated process and is there any easy method for this...??
    thanks,
    Simadri

    Hi.,
    It wont get complicated.,  try this.,
    Let us say you have 3 drop down lists., for ID, Name , Priority., now in OnActionSearch.,
    DATA:RT_RANGES_ID TYPE RANGE OF ZDE_ID,  " Data Element for ID
              RS_RANGES_ID LIKE LINE OF RT_RANGES_ID,
              RT_RANGES_NAME TYPE RANGE OF ZDE_NAME, " Data Element for Name
              RS_RANGES_NAME LIKE LINE OF RT_RANGES_NAME,
              RT_RANGES_PRI TYPE RANGE OF ZDE_PRIORITY, " Data Element for Priority
              RS_RANGES_PRI LIKE LINE OF RT_RANGES_PRI.
    *Read the Values in Drop down List using get_attribute( ).
    now.,
    *Appending ID to Range Table
    if  lv_id is not initial.                              " here lv_id is the drop down value in Drop Down List for ID
       RS_RANGES_ID-OPTION = 'EQ'.
        RS_RANGES_ID-LOW    =  lv_id.    " appending ID
        RS_RANGES_ID-SIGN   = 'I'.
        APPEND RS_RANGES_ID TO RT_RANGES_ID.
    endif.
    if  lv_name is not initial.
       RS_RANGES_Name-OPTION = 'EQ'.
        RS_RANGES_NAME-LOW    =  lv_name.    " appending Name
        RS_RANGES_NAME-SIGN   = 'I'.
        APPEND RS_RANGES_NAME TO RT_RANGES_NAME.
    endif.
    if  lv_priority is not initial.
      RS_RANGES_PRI-OPTION = 'EQ'.
        RS_RANGES_PRI-LOW    =  lv_priority.   " appending Priority
        RS_RANGES_PRI-SIGN   = 'I'.
        APPEND RS_RANGES_PRI TO RT_RANGES_PRI.
    endif.
    * Fetching Values for Selction Criteria
    Select  * from <TABLE> into lt_int_tab where ID IN RT_RANGES_ID
                                                                     AND NAME IN RT_RANGES_NAME
                                                                     AND PRIORITY IN RT_RANGES_PRI.
    similarly You do for your 7 Drop Downs..
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • Display many fields of a lookup table in the main table

    Hello Experts,
    In MDM, I have a "Suppliers" table which is a lookup table. This table has 4 fields :
    - Supplier Name (Display Field)
    - Supplier Code
    - Email
    - Phone number
    In the main table, a field "Supplier" uses the "Suppliers" lookup table. This fields displays the "Supplier Name" of the "Suppliers" lookup table.
    Now I also want to display the "Email" and the "Phone Number" of the supplier. If I set these fields as Display Fields in the "Suppliers" lookup table, they appear concatenated in the main table, which I don't want.
    The only way I found to display those fields is to set 2 new fields in the main table as calculated fields, eg: IF(TRUE, Supplier.Email).
    Is there any way to display those fields w/o using calculated fields?
    Thanks for your help

    Hi Christian,
    Thanks for your help. Actually I am working on the SRM part of MDM, so I do not use portal to display data but the SRM-MDM UI on which I can not manage iViews.
    The need is to have, for each Material displayed, the name and the contact data of the Supplier. If I concatenate those data  the display is not very clear for the user. Eg:
    Supplier data: TOTO, contact_at_toto.com, 1234567890
    I would rather have :
    Supplier: TOTO
    EMail: contact_at_toto.com
    Phone Number: 1234567890
    As you said, the non automatic update of calculated fields is an issue in my case. So I am currently looking at assignments, which seems to be schedulable via a workflow but I don't know if it's a good mean?
    Best regards,
    Patrick

Maybe you are looking for

  • How to make my website fit to all resolution?

    Hi all, I'm a beginner for using dreamweaver.  I've been looking for this question but I think it doesn't solve my problem. I want to make my website fit to all screen resolution. At first, I preview it at mozilla  and Internet explorer and its ok. B

  • Old computer died, need to get my music from my ipod touch to my pc, how can I do this without losing music for free!?

    I have an Ipod touch with about 900 songs on it, i used to connect with my old pc until it recently broke. i have just bought a new pc and was wondering how i could get my music from my ipod to my new computer! the only thing i need is music , no vid

  • Flash Drive not supported

    Hello everyone, I purchased a SanDisk Cruzer Micro 1.0 GB flash drive not too long ago and it was working fine. Removed some software that was on it because I couldn't use it. Used my flash drive today and I receive this error, but still kinda works.

  • Pro TAC display not working?

    My Pro TAC (ink measurement) does not seem to be working properly. Does not see whole image. Anyone else seen this?

  • Very slow safari, slow system trash won't empty

    Help Trying to clean up my 09 MacBookPro. safari has been pretty slow and i keep getting what i like to call 'the wheel of death' on my desktop on opening safari or searching or opening some apps. i Have purged my Mac to free up some RAM as it was ru