Kindly help me with the request to find the data in two tables

Hello Guru

Kindly help me to recover the data from two tables-

BASEBALL
LEGAL_ENT_ID (PK)
GAME_ID (FK)
LEGAL_ENT_NM
INACTIVE_DT
DATE OF INS_TS
INS_LOGIN
DATE OF UPD_TS
UPD_LOGIN


FOOTBALL
GAME_ID (PK)
BRKR_NM,
BRKR_ISR_ID
BROKER_SYMBOL
INACTIVE_DT
BRKR_SWIFT_FLG
BRKR_INTERNAL_FLG
BRKR_CATEGORY
UPD_TS
MINORITY_FLG
BROKER_TYP
STATUS
INS_TS
INS_LOGIN
UPD_LOGIN
APP_USER
ACTIVE_FLG

and if I want fecth data from these two tables according to the following condition then it is fine with the suite of applications.

1 select distinct values only table of BASEBALL by using the following query.

SELECT DISTINCT B.GAME_ID as 'CLEARING GAME ID', B.BRKR_NM "NAME of THE GAME of COMPENSATION" OF BASEBALL A, FOOTBALL B WHERE A.BROKER_RELATION_CD IN ('FUTBRKR1', 'FUTBRKR2') AND A.GAME_ID = B.GAME_ID

2 Select all the table BRKR_NM OF FOOTBALL as well by using the query - next

SELECT GAME_ID "RUNNING GAME ID", 'NAME OF THE GAME OF EXECUTION' BRKR_NM SOCCER

Now, my query is that--

I want a query that gives me a combination of above mentioned queries... and if I tried to use Union or Union All, then she is not giving me the result as expected.

I like the result to look like who has a few conditions such as -
1 - the records in the table Football are high vs Baseball table because there is no condition to filter the records of the Football.
2 - football is a superset of records and Baseball is a subset.
3 - COMPENSATION NOM_JEU and RUNNING NOM_JEU may return the same values as well.

I want the result to be in the following form-

EXECUTION ID GAME | NAME OF THE GAME TO RUN. COMPENSATION ID GAME | DELETE THE NAME OF THE GAME.
2123 test1 2345 test5
2456 test10 2456 test10


Thanks in advance. Kindly help me.

Published by: user555994 on January 4, 2011 23:48

In the output you want.
All the values of baseball;
Values of football that are matched;
But on what condition you want to match?

Tags: Database

Similar Questions

  • How to find the data in two tables are the same?

    Hi people,

    Suppose we have table emp01, have 10 records and create another emp02 as table

    create the table emp02 in select * from emp01;

    now both the table has the same data.

    How to find a 'data' in the two tables are the same?

    Hello

    SELECT *
    FROM emp01
    MINUS
    SELECT *
    FROM emp02
    UNION
    SELECT *
    FROM emp02
    MINUS
    SELECT *
    FROM emp01
    

    You can also compare resultset hash to select * in emp01 and select * from emp02 by using dbms_sqlhash.

    Best regards
    Nikolai

  • Select the data in two tables

    Hello

    I am trying to build a query WITH, but I can't seem to make it work:

    WITH P1 AS (SELECT OT_VALUE

    OF CSD_OPEN_VERY_HIGH_INCIDENTS VHIGH

    WHERE OT_VALUE > = 0

    ). P2 AS (SELECT OT_VALUE

    OF HIGH CSD_OPEN_HIGH_INCIDENTS

    WHERE OT_VALUE > = 0

    ), SELECT VHIGH. OT_VALUE, TOP. OT_VALUE

    P1 P2 JOIN INTERNALLY. RATING = P2. RANKING

    The two tables have the same column names.

    I want to only return a set of results if the two columns (OT_VALUE) contain in reality 1.

    Select this check box. This is a job for all four images. This will return the line to the following combinations. 0.0 and 0.1 and 1.0 and 1.1. Importance is 1.2.  Let me know if you face any problem

    SELECT CASE WHEN ((VH_OT_VAL = 0 ET H_OT_VAL = 0) OR (VH_OT_VAL = 1 AND H_OT_VAL = 0) OR (VH_OT_VAL = 0 AND H_OT_VAL = 1) or (VH_OT_VAL = 1 AND H_OT_VAL = 1)) 1

    ANOTHER ACE OF NULL TERMINATOR OT_VAL

    DE)

    SELECT H.OT_VALUE H_OT_VAL,

    VH. OT_VALUE VH_OT_VAL

    OF CSD_OPEN_VERY_HIGH_INCIDENTS VH.

    CSD_OPEN_HIGH_INCIDENTS H

    WHERE NVL (VH. CLASSIFICATION, 0) = NVL(H.CLASSIFICATION,0)

    AND VH. IMPORTANCE IN (1,2)

    AND H.IMPORTANCE IN (1,2)

    AND NVL (VH. OT_GROUP, 0) = NVL(H.OT_GROUP,0)

    AND VH. IMPORTANCE = H.IMPORTANCE

    AND VH. TIME_STAMP = H.TIME_STAMP

    );

  • display the data in two tables.

    Hi considers the following data
    WITH table1 AS
    (
      SELECT 111 userid,  To_Date('7/31/2010','mm/dd/yyyy') dt  FROM dual UNION ALL
      SELECT 111 userid,  To_Date('8/1/2010','mm/dd/yyyy') dt  FROM dual UNION all
      SELECT 111 userid,  To_Date('8/2/2010','mm/dd/yyyy') dt FROM dual UNION ALL
      SELECT 111 userid,  To_Date('8/3/2010','mm/dd/yyyy') dt  FROM dual UNION ALL
      SELECT 111 userid,  To_Date('8/4/2010','mm/dd/yyyy') dt FROM dual UNION ALL
      SELECT 111 userid,  To_Date('8/5/2010','mm/dd/yyyy') dt  FROM dual UNION ALL
    
      SELECT 222 userid,  To_Date('2/28/2010','mm/dd/yyyy') dt  FROM dual UNION all
      SELECT 222 userid,  To_Date('3/5/2010','mm/dd/yyyy') dt  FROM dual UNION all
    
    ),
     mydates AS
    (
     SELECT To_Date('7/31/2010','mm/dd/yyyy') dt1, To_Date('8/4/2010','mm/dd/yyyy') dt2 FROM dual  UNION ALL 
     SELECT To_Date('2/28/2010','mm/dd/yyyy') dt1, To_Date('3/5/2010','mm/dd/yyyy') dt2 FROM dual 
    )
    I want to join these two tables and result the following
    DT        DT2
    7/31/2010 8/04/2010
    8/01/2010  8/01/2010
    8/02/2010  8/02/2010
    8/03/2010  8/03/2010
    8/04/2010  8/04/2010
    8/05/2010  8/05/2010
    
    2/28/2010  3/5/2010
    3/5/2010   3/5/2010
    Basically, I join two tables, take dt from table1 and look into mydates. If the data match then display dt and DM2.
    If the date in table1 does not match date in t1d in mydates, then display the data but dt and DM2 there same date.

    for example,.

    7/31 in table1 is 7/31 in mydates so I show 7/31 dt and DM2 as 8/4(from mydates).
    now 8/01 does not match all lines in my dates so dt should be 8/01 and T2D should be 8/01. same logic applies to the other lines

    can someone write a query that gives the above result? Thank you

    Hello

    If you want all lines of table1 (attached to mydates when this is possible, but even when there is no match) then use an outer join:

    SELECT     t.dt
    ,     NVL (m.dt2, t.dt)     AS dt2
    FROM          table1     t
    LEFT OUTER JOIN     mydates     m     ON     t.dt     = m.dt1
    ORDER BY     t.dt
    ;
    
  • Is mapping dimension AWM - possible to load the data in two tables of entry?

    Hi all

    I have two tables ProductFamily (parent level) and products (child level).

    I want to load a dimension of those tables where the parent-child relationships are maintained (I use AWM).

    I created a map with these two entry tables, but the loaded data has no relationship.
    So, how do I do that? Is it possible to load dimensions where different levels get data from multiple tables?
    Is any type of Carpenter available in AWM?

    Thank you

    ------------------------

    A few Notes:

    -I don't want to use OWB here that my data are clean
    -In AWM, when I loaded the data in a single view that contains two tables of input data, it worked fine. But it's my worst case option.

    You must use Dimension option in snowflake in the mapping screen of size for the Product Dimension (as opposed to the default style mapping - star schema dimension).

    This will modify map entries to include a separate parent for each level of hierarchy level / that is to say, for each level of hierarchy / (unless a higher level of the hierarchy), you must specify the parent level key in addition to the key current level, code/name/description/other attributes etc.

    You can make the mapping or... use the icons at the top of the map screen.
    mode drag/drop by dragging the relational column on dimension - level/hierarchy/attribute model
    -or-
    the table expression mapping mode that gives the same effect... by dragging a column on an attribute defined in the .

    . the format of .

    HTH
    Shankar

    Note1: Complete the mapping of a sudden... B & w switching mapping modes cause the mappings to reset.
    NOTE2: assumes that your data are correct foreign key table parent level: ProductFamily exists in the child level table: products.

  • Load the rule with the data in two columns.

    I have a SQL Interface as the source of data for my rule to load but I have two columns of data, it is possible to load them into the same rule of load?

    Published by: user5170363 on June 4, 2010 18:51

    Published by: user5170363 on June 4, 2010 19:04

    This is in addition to what Glenn says.
    Generally, we will have two types of data files.
    If we have five dimensions.

    (1) in the first five columns of data files is the names of the members and the last column data.
    The mapping is like this:
    column contains the names of the members the deposited property is a corresponding dimension name
    column contains numbers the area of the given property.

    (1) in the foucolumns files first is the member names and you have one or more columns of data
    The mapping is like this:
    column contains the names of the members the deposited property is a corresponding dimension name
    column contains numbers the property field is the names of the members of the dimension remaining problems (level 0).

    Note: To provide the missing information from the dimension, you can use header definition in the rules file.

  • How to create a select statement to the data in two tables?


    Hi all

    Table 1

    ID YEAR

    758 2013

    Table 2

    ID YEAR

    758 2014

    I want to create some that translates into two lines: function that does this?

    ID YEAR

    758 2014

    758 2013

    Thank you, best regards.

    Hello

    Perhaps a select * from table1 UNION ALL select * from table2 will help you.

    concerning
    Kay

  • I want to loop through the data from two different tables using for loop where the query should be replaced at runtime, please help me

    I have the data into two table with the structure of similar column, I want to loop through the data in these two tables

    based on some condition and runtime that I want to put the query in loop for example, the example is given, please help me

    create table ab (a number, b varchar2 (20));

    Insert into ab

    Select rownum, rownum. "" sample "

    of the double

    connect by level < = 10

    create table bc (a number, b varchar2 (20));

    Insert into BC.

    Select rownum + 1, rownum + 1 | "" sample "

    of the double

    connect by level < = 10

    declare

    l_statement varchar2 (2000);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: =' select * ab ';

    on the other

    l_statement: =' select * from bc';

    end if

    I'm in execute immediate l_statement - something like that, but I don't know

    loop

    dbms_output.put_line (i.a);

    end loop;

    end;

    Something like that, but this isn't a peace of the code work.

    Try this and adapt according to your needs:

    declare

    l_statement varchar2 (2000);

    c SYS_REFCURSOR;

    l_a number;

    l_b varchar2 (20);

    Boolean bool;

    Start

    bool: = true;

    If it is true, then

    l_statement: = "select a, b, AB;

    on the other

    l_statement: = "select a, b from bc;

    end if;

    --

    Open c for l_statement;

    --

    loop

    extract the c in l_a, l_b;

    When the output c % notfound;

    dbms_output.put_line (l_a |') -' || l_b);

    end loop;

    close c;

    end;

    /

  • Delete the data in partitioned tables

    Hello

    Oracle 11.2.0.3.0 version, running on Linux Enterprise.

    I need to remove all the data from two tables (several 100 million lines each) that are partitioned.

    (1) table 1 is a partition table have varied to a DATE column

    (2) Table2 is a partition of reference table; partitioning is referenced on a relationship of foreign key to Table1 (column: key Table1.Primary)

    As I have no need for data, but want to keep the structure of the table, I would ideally like to delete partitions at the same time that the deletion of the data, so that the 2 tables partitioned and empty.

    Additionally, Table1 has some partitioned index I would be rebuilt as an index unpartitioned (given that Table1 will be empty).

    I thought I would start by removing all partitions of Table1 (via "ALTER TABLE DROP PARTITION nom_partition Table1"), but when the script came to the last partition, I got this error message:

    ORA-14083: cannot delete the only one partition of a partitioned table

    ORA-06512: at "SYS." DROP_PARTITIONS', line 46

    If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?

    Thanks in advance for any guidance.

    If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?

    Yes - delete the tables and re-create them.

    As says the exception that you cannot delete the last partition. A table is partitioned either or it is not.

    There was no interest at all to use DBMS_REDEFINITION to redefine tables because you do not want the data anyway.

  • can someone help me with the link to download hp2050 print drivers that are compatible with windows 8.

    can someone help me with the link to download hp2050 print drivers that are compatible with windows 8, my software CD is not compatible with windows 8, and I can't use the printer now.

    Hello

    The installation program "Full Feature" can be found on the following link.

    http://h10025.www1.HP.com/ewfrf/wc/softwareDownloadIndex?softwareitem=Al-109407-2&cc=us&DLC=en&LC=en&OS=4132&product=4027469&sw_lang=

    Kind regards

    DP - K

  • help reqd with the cmdlet "get-customattribute.

    Hey all

    Can someone help me with the cmdlet above pls?

    What I'm trying to do, it is all simply do a search in our VC against some "custom attributes" and confirm the virtual machines associated with them.

    (i.e. custom attribute 'RED' has a servers VM called "SERVER1, SERVER2, etc.")

    I tried to find objects associated with this and all I get is the following objects:

    ServerId
    Server
    That is to say;
    Name
    TargetType
    UID
    Customer

    So, how can I use these to get something that again relates a servernames VM?

    As usual - thank you very much in advance for your help

    Munster99

    Of course, try it like that

    Get - VM | Get-Annotation - CustomAttribute "red" | Where {$_.} Value}

  • I would like to delete a short gray border of two images. I need help because I'm still not able to use PhotoShop. Could someone kindly help me with this?

    I would like to delete a short gray border of two images. I need help because I'm still not able to use PhotoShop. Could someone kindly help me with this?

    In order to change a part of an image as needed here, I would use the "Liquify" filter See below, it is quite easy. You just move the lower lip to be more elegant and not like the guys are salivating.

  • Need help with the data storage store, local array and network connections

    Need help with my ESXi 4.1 installation

    My hardware:

    I built a server with an Asus P6T whitebox, i7 920, 12 Gig RAM, NIC, Intel Pro1000 PT Quad, 3ware 9650SE-12ML with 8 1.5 TB SATA green in a raid 6 array gives me about 8 + TB with a spare drive all housed within a NORCO RPC-4220 4U Rackmount Server chassis.  I also have a 500 GB SATA drive which will hold the ESXi and virtual machines.

    The network includes a firewall, Netgear Prosafe FVS336G, GS724Tv of Netgear ProSafe 24 port Gigabit Managed Switch on a dhcp cable modem internet service provider.

    I also have 2 old NetGear SC101T NAS disks (4to) I want to connect to the system how some - at a later date have... data on them and want to transfer to the new storage array. I always looking into the question of whether they will work with ESXi 4.1, or I might have to only access it through Windows XP.

    My Situation:

    I have already installed ESXi 4.1 and vsphere client with no problems and it is connected to a dhcp cable internet service.  I've set up host via a dynamic DNS service name give me a static hostname on the internet.  I installed three machines to virtual OS successfully at the moment and now want to first start by creating a multimedia storage server which will use some of this new 8 TB array, then separate data storage for use with a web server small overhead storage and a backup.  It is a domestic installation.

    Help with the data store and network:

    I was doing some reading, because I'm new to this, and it looks like I'll probably want to set up my table via ESXi as a nfs disk format.  Now, the data store is usually in another physical box from what I understand, but I put my readers and ESXi all in the same box.  I'm not sure that the best way to put in place with grouped network cards, but I want to make this work.

    I understand that in ESXi 4.1 using iSCSi LUN must be less than 2 TB, but nfs - I should be able to add a bigger partition then 2 TB (for my multimedia) in nfs, right? or should I still add it separately as a separate 2 TB drives and then extend them to get the biggest space.

    Any suggestions or direct resources showing examples on how to actually add some parts of the table as data warehouses separate nfs.  I know that to go to the configuration tab, and then select Add to storage, and then select nfs. I have not my picture, but it's here that I don't know what to do because ESXi 4.1 system already has an address, should I put the same thing to the new data store array also (will it work?), and what should I use for the name of the folder and the store of data... just do something to the top.  I thought to later install Openfiler (for a multimedia storage using this table server) as a virtual machine, use the table with esxi so that I can access the same storage space with widows and linux-based systems.

    I also know I have to find a way to better use my quad nic card... put in place of virtual switches, grouping, etc HELP?

    Any direction, assistance, similar facilities to sample, suggestions or resources that would help would be great. I did a lot of hunting, but still a little confused on how to best to put in place.

    You must think of VMDK files of large databases with records of random size guest go read some data (a DLL or an INI file), maybe write some data back, then go read other data. Some files are tiny, but certain DLLs are several megabytes. It's random i/o all and heavy on the search time. IO Opsys is small random operations that are often sequential (go read data, write data, go read other data,...) so that deadlines are critical to the overall performance. That's why people say OPS are / s of reference and forget the MBs flow. The only time where you bulk transfers are when you read media (ISO files).

    Well, now forget all this. Actually the disk activity will depend on the specific applications (database? mail server? machines compiler?), but the above is true for boots, and whenever applications are idle. You should see the profile to know.

    RAID 10 is faster (and often more reliable) than RAID 5 or RAID-6 except in certain specific cases. In General RAID 10 is ideal for many random writes, since the calculation of parity for RAID-5 and - 6 adds to the overall latency between command and response - latency is cumulative if a little slow here and a little slow it adds up to a lot of overall slow synchronous especially with e/s on a network. OTOH RAID-5 and -6 can produce faster readings due to the number of heads, so you can use it for virtual machines that transfer bulk. Test. You may find that you need several different types subdashboards for best results.

    You said 3ware, they have some good grades on their site, but don't believe it. With my 9650 that I found myself with only a couple of their recommendations-, I put the (simple) table for allocation size 256 k, nr_requests at 2 x the queue_depth and use the planner date limit. I had the habit for the Ext4 file system formatted with stride and stripe-width synced to the table and used the options large_files with fewer inodes (do not use the huge_files option unless you plan to have single VMDK files in the terabyte range). Use a cache of great reading in advance.

    Virtual machines use VMDK files in all cases except raw iSCSI LUN that they treat native disks. VMDK is easier to manage - you can make a backup by copying the file, you can move it to a PC and load it into another flavour of VMware, etc. There could be some features iSCSI to your San as a transparent migration but nothing for me. NFS has less chatter of Protocol if latency lower times to complete an operation. NFS is good to read and write a block of data, that's all it boils down to.

    UPS is good, but it won't help if something inside the machine explodes (UPS does nothing if the PC power supply goes down). If the RAID card has an option for a battery backup module, so it can contain some writings in memory and may end up the disk i/o after replacing the power supply. 3ware also limits the types of caching available if help is not installed, and you get just the right numbers with the module.

  • Hello! Can someone help me with the address of repair service for Palm TX?

    Hello! Can someone help me with the address of repair service for Palm TX?

    Good luck and please, let us know here how it works for you.  We like to know current resources, which can help to solve the problems of people with these older devices.

  • I can't make a connection wifi with my Nook Color camera using a Microsoft MN - 700 wireless router. Can someone help me with the settings that could take care of this problem?

    I can't make a connection wifi with my Nook Color camera using a Microsoft MN - 700 wireless router.  Can someone help me with the settings that could take care of this problem? I have a Dell netbook and a laptop HP working with the router so I know it works.  The Nook also works in a Barnes & Noble store it seems so that the works of Nook.  I have a similar problem with a LG Vortex phone where I can't do the wi - fi connection.

    Please post on the Support forums technical Nook for help because it is not a Windows 7 problem...

    http://bookclubs.barnesandnoble.com/T5/nook-technical-support/BD-p/nooksupport

    .. .also than that...

    http://www.barnesandnoble.com/u/nook-support-connectivity/379002491/

    Don't forget the network encryption type, IE. WPA2/WPA and key/password / password must match the wireless router/access point.

    See also this about WPA2 on the MN-700...

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-networking/cant-connect-to-MN-700-wireless-router/1789978f-7C90-4686-A956-2d17eb79960d

Maybe you are looking for

  • Even if the setting is correct, Firefox does not windows and tabs from last time at the reopening?

    I have the habit of keeping three firefox windows open at the same time and I've always defined (under the general tab) ' display windows and tabs from last time '. It has stopped working. The setting is the same, but when I close and then reopen fir

  • Re: Mouse problem Bluetooth on the Satellite A660

    Some days, I got BSOD (b4 he mouse worked fine.) Then after reboot mouse was not recognized, so I tried to re - connect, but battery BT said whenever I try to connect: "Detection of Service failed" any help would be appreciated. My mouse is zepater T

  • HP-H8-1140sc: update my motherboard

    Hello. I bought a new MSI Nvidia gtx 960 and I want to install on my pc, after checking on the net, I found on my card HP mother IPISB-CH2 is not able to run under its not with the 3.0 update. I'm ready to upgrade my motherbaord but I understand that

  • MyRIO PID Ball Balance project or selection

    Good afternoon I am a student in engineering mechanics senior year and I'm working on my thesis project. I'm creating a TA for students. I try to balance a ball on the touch screen using a microcontroller. Here is a link to show you what it is that I

  • That meant disabled in the basic wireless settings?

    Hello I bought a WRT160N and find that there is an option "Disable" in the basic wireless menu. I want to know if I chose this option, the router stop its wireless signal or just can not use the wireless function? I mean, if I chose this option, this