End Select when where 1 row of person in charge

Hello

I need to know that this line of at least 1 dependent exists for the parent.

Is is possible to put an end to select it when the focus is the line from 1 person to load instead of counting all the dependants, and how - what is done?

I use LEFT OUTER JOIN to determine that there is no one in charge.

Thanks in advance for your help,

Lou

Probably you need the EXISTS operator, such as

SELECT * FROM parent_table WHERE IT EXISTS (SELECT * FROM dependant_table WHERE dependant_table.ID = parent_table.ID)

Instruction SELECT i to this you returns all of the rows of parent_table
If at least one line in the load table exists and that it meets the condition "dependant_table.ID = parent_table.ID".

Rgds.

Tags: Database

Similar Questions

  • I want to install creative cloud. When I connect with my personal information, I can't have the country where I live. I call the free number but it is the number o the firefighter... How can I change the country where I live to make the payment?

    I want to install creative cloud. When I connect with my personal information, I can't have the country where I live. I call the free number but it is the number o the firefighter... How can I change the country where I live to make the payment?

    Please see the change of the country associated with your Adobe ID.

    To change the Adobe ID, you can check your Adobe ID account management

    For further help please contact the Support from Adobe on the Customer Contact

    Hope this will help you.

    Kind regards

    Hervé Khare

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • Hi, I do not know where to turn: the person who takes care of all the stuff of count is out of town, this friend started Firefox and there was a message about an update, I thoght I again just click on install and wait to re start Firefox. But what I remem

    Hi, I do not know where to turn: the person who takes care of all the stuff of count is out of town, this friend started Firefox and there was a message about an update, I thoght I again just click on install and wait to re start Firefox. But what I remember is this another open window and asked me to choose 'something' (an icon or banner or?), I thought I have to click on an element (I guess I should read all clearly). Firefox updated to 3.6.4, but it also inserted some sort of what might be called a banner? But it does cover only partially the half right of my 3 toolbars at the top of the Firefox window. It cannot be used to something else because it's just a mess of colors and unknowns, except for what looks like a 'top' and what I recognize as an icon of Firefox (but only partially visible)! Now, what he does, it's partly hide this part all the toolbars and they are difficult to read and to do to turn this 'thing' impossible to understand, if I keep to? I can't find in any case to remove it or use it? But since the icon of Firefox is about it, I think you need to know what it is and how trash. I'm sorry for this accident caused my my inattention, but I'm not much of a computer person - HELP! Thanks for any help. Judi

    This has happened

    Each time Firefox opened

    Today is Thrsday June 24, 2010

    The only thing I can imagine: it's a character.

    Tools-> Add-ons-> Themes
    Here should be the character (light theme)
    and a button 'delete '.

    Click on it (delete button), and he (Persona, this mixture of colors) should disappear instantly.

    This help you?

  • When starting, my windows xp hangs or crashes when you try to load 'personal settings '. I can't do something, but stop once again on commissioning, she repeats the same actions.

    When starting, my windows xp hangs or crashes when you try to load 'personal settings '. I can't do something, but stop once again on commissioning, she repeats the same actions. What now? Thank you

    Hello

    Disconnect all external devices from the computer and try to restart the computer and check what is happening.

     

    Step 1:

    Try to boot to the desktop in safe mode and check what is happening. Only basic files and drivers needed to run Windows are started. If a problem doesn't reappear when you start in safe mode, you can eliminate the default settings and basic as possible cause device drivers. To start in safe mode follow the link.

    http://support.Microsoft.com/kb/315222

    Step 2:

    If you are able to boot to the desktop in Mode safe, it means that the third-party application prevents the computer from starting in normal mode. To check you can configure the computer to clean start State and then try to boot into normal mode and check what is happening. To set up its own start-up follow the link below.

    http://support.Microsoft.com/kb/310353

    If the problem does not continues when the computer is in the clean start State follow the steps listed to identify which application is causing the problem.

    Note: When you are finished troubleshooting, follow step 7 article to start on normal startup.

    Hope this information is useful.

    Amrita M

    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Hello! My question is, why so many photoshop is making selection when using the quick selection tool, before that it was unable to myself. Can someone tell me aolucion, please. Thank you!!

    Hello! My question is, why so many photoshop is making selection when using the quick selection tool, before that it was unable to myself. Can someone tell me aolucion, please. Thank you!!

    Hi Axe_Juan,

    Could you please let me know the version of Photoshop installed on your computer?

    Also you want to State as Photoshop not to do a quick selection?

    If so, then head over to the Photoshop preferences, then the performance tab and click on 'Big and flat', restart Photoshop and then use the selection tool.

    If something else, please let me know.

    Kind regards

    Tanuj

  • Cannot print pdf.  indicates the pages are not selected when everything is selected or 1-12 is selected.  Why not print it and what has changed since he has always worked in the past?

    Cannot print pdf.  Message says pages are not selected when "all" is selected or when the "pages 1-12" is selected.  Why will it not print what is always in the past?

    Hi donw50735963,

    Please try the steps in the following article: Acrobat and Reader help / troubleshooting PDF printing | Adobe Acrobat, Adobe Reader

    Thank you

    Abhishek

  • Some photos are not selected when I try to import ("do not import possible double images" is turned OFF!)

    Some photos are not selected when I try to import. I used Lightroom 5 since it launched and do not have this problem until a month ago (select: "do not import possible double images" is turned OFF!). I really have to control my import in the opposite case, it miss a few images, but don't know what to do when the picture is not selected. How can I import the correctly without making stuff and that's why spoil my archive carefully planned? My archive is too packed and I have double numbers ore something? What I need Lightroom 6?

    Thank you very much for your help!

    Best regards, Enith

    "Photos are indeed grey, but the imported photos are new assignments, so this:" ","then it means that you have previously imported photos in Lightroom, and so it is not necessary to import them again ', is not the case.

    While you are probably right, if the photos were just captured, the problem is that Lightroom think that these are the same pictures that were previously imported, and so until you can determine why Lightroom think that you won't progress.

    You need search for any of these photos in your Lightroom Catalog. Follow these 4 steps in order

    1. In the catalog Panel on the left side of the library Module, click all photographs
    2. Develop all batteries (picture-> stacking-> develop all batteries)
    3. Disable all filters (once or twice Ctrl-L)
    4. Search for one of these photos by file name
  • Find Information of the person in charge

    Hi all

    I want to display the name of the person in charge with their parent's name

    people_Details / / DESC
    Pers_id P_name, emp_number, sex, date of birth
    101 - Rajeev - 1101 - M - December 2, 1970
    102---SumithaRajeev---F---10-Jun-1980
    103---John---1002---M---18-Jan-1965
    105---RAJ---1023---M---23-SEP-1967
    106---RenukaRaj---F---10-Mar-1972


    people_dep / / DESC

    pers_id, dep_pers_id, status
    101-102 - spouse
    105-106 - spouse


    Desired output

    EMpno - Parentname DepName- depdob
    1101 - rajeev - SumithaRajeev - June 10, 1980
    105---Raj---Renukaraj---10-Mar-1972

    Rgds
    Marie Louise

    Warren,
    Thank you for taking the effort to make the data.

    OP,
    Here is one approach. Its basically identical to Warren, but shows how the WITH clause must be used each time that these joints are inevitable.

    WITH par AS (select 101 Pers_id, 'Rajeev'        P_name, 1101 emp_number, 'M' gender, '2-DEC-1970'  dob from dual union all
               select 102 Pers_id, 'SumithaRajeev' P_name, null emp_number, 'F' gender, '10-Jun-1980' dob from dual union all
               select 103 Pers_id, 'John'          P_name, 1002 emp_number, 'M' gender, '18-JAN-1965' dob from dual union all
               select 105 Pers_id, 'RAJ'           P_name, 1023 emp_number, 'M' gender, '23-SEP-1967' dob from dual union all
               select 106 Pers_id, 'RenukaRaj'     P_name, null emp_number, 'F' gender, '10-MAR-1972' dob from dual) ,
               dependant AS
              (select 101 Pers_id, 102 dep_pers_id, 'spouse' status from dual union all
               select 105 Pers_id, 106 dep_pers_id, 'spouse' status from dual) 
    
              SELECT par1.pers_id,par1.p_name,par2.p_name,par2.dob FROM par par1,dependant,par par2
              WHERE par1.pers_id=dependant.pers_id AND dependant.dep_pers_id=par2.pers_id
    

    See you soon!
    Bobin

  • where can I buy a new charger for hp slate 7

    Hello

    In fact, I am Delhi n I bought hp slate 7 just 1 months ago, yesterday I was charging my n ph suddenly someone opened the door n that it smashed on my charger n, usb cable broke. I know that's not cover under warranty it's physical damage, but I just want to know where I can buy a new charger because I don't want to use any other change with it and please confirm price also about. Also if there is another solution, please let me know.

    Please I need answer of the person who knows the answer.

    Thank you
    Ravinder Singh

    Hi kaka340,

    You can visit the HP website for accessories:

    http://www.shopping.HP.com/en_US/Home-Office/-/search-SimpleOfferSearch; PgId = XspAL6Uc.wJSRpwq9zmv6weo00003peauZBk; sid = aB83uxXvxWg2u0YeF5NjO8zg75N9epJjIt7AtEMP75N9ej0ZF3oPUEJQ? PageSize = 15 & search = & SearchTerm = Tablet + charger

    In addition, you can make your tablet in a local store and you can buy a compatible charger.

    This range of products also use the same PIN load as for any other android phone/tablet device.

    I hope this helps.

  • Where can I get a new charger for Satellite Pro L500 - 1 4?

    Hi, I would like to get a new charger for Toshiba. My first charger was lost and the second charger that I bought on ebay 3 months ago for £10,-a stopped working. Where can I get a charger? I googled and found a few wesbites for example

    http://www.electronicavenue.co.UK/Toshiba-Satellite-Pro-L500-1D4-laptop-charger-6380-p.asp

    Chargers cost about 25-30 GBP. I don't want more problems with a charger. I have the late...
    Where can I get a good charger where that is authentic. Other suggestions are welcome

    Thanks in advance

    The magazine you found is OK and I think you don't need original Toshiba charger.
    If you want to have Toshiba we part number is PA3716E-1AC3.

    Check it out. Googling around you can find it.

  • iPhone 6 s is not wake up when you remove the cable from the charger.

    Hi all.

    I noticed that sometimes my iPhone didn't wake not (the lock screen display) when the charging cable is removed. the charger / sync port seem otherwise works normally.

    Is this normal?  I'm guessing that this happens because sometimes when the battery is fully charged, no power goes to the phone and if you pull the cable then, the phone can't tell you have removed the cable, but I have not seen this happen on my previous phones.

    Thank you!

    Yes, this sounds like normal behavior! On my iPhone 6, when it reached 100% of their capacity and is completely loaded, as it stops in charge, which is why when you unplug the iPhone from the charger the screen does not automatically wake up, because the charger stopped output power to the iPhone when it finished filling. I hope that answers your question!

  • Pdf export was on my laptop when it was stolen. You still charge me for it. Can I download and install again?

    Pdf export was on my laptop when it was stolen. You still charge me for it. Can I download and install again?

    Hi alang61123979,

    Of course, you can download Adobe Acrobat Reader DC (Acrobat Reader DC Learn & support) & Sign In using your Adobe ID to use the service to export in format PDF Adobe help Acrobat Reader | Export PDF to Acrobat Reader DC.

    Kind regards

    Nicos

  • Highlight field when the table row is selected

    I have a table view with a couple of lines in there. such a line has a white and gray text. now, when I select the line, the background turns blue to indicate the selection. the problem is that can not read the grey-blue text correctly. you have an idea on how to change the color when this specific line is selected? I need somehow to be able to receive the event in my implementation of custom label to react accordingly on the selection within my method of painting. Thanks, remo

    well, the thing is a little naughty...

    It takes extends a TableController and overwrite the navigationMovement (...) method that acts as an event listener.

    Then you can get the fields and the model of line data and access.

    int rowNr = (getView()) .getRowNumberWithFocus () (TableView);

    Model DataTemplate = (getView()) .getDataTemplate (rowNr) (TableView);

    Scope of fields [] = template.getDataFields (rowNr + 1); I want to get the next line!

  • When I right click on a page and select 'Copy' where the copy goes on my computer?

    I'm just trying to copy the page but I don't know where he's going. I guess that's what the copy function?

    See also http://en.wikipedia.org/wiki/Clipboard_%28computing%29

Maybe you are looking for

  • New date mask down arrow of scroll behind the taskbar in window mode full how to fix this?

    After again until this day, the right and bottom of the if scroll bar of browser under the taskbar. I have windows 7. I checked the addons and extensions and they have made no change. The last thing that update has been the default theme.

  • I need to downgrade my OS

    Just, I upgraded my OS and I have some problem of compatibility with my Numark MixDeck Express controller running Serato.  I am not getting any audio sound card of the computer that works with other applications. I need to downgrade to Yosemite to ma

  • change the column of the tree

    Hi guys,. I'm new to the tree control.  I'm trying to programmatically change the State of the second column without changing the text of the left cell in the control (see attached photo).  Can you please point me to the right direction?  I use Labvi

  • HP Envy 6-1006sa USB 3.0 ports does not.

    Hello I have a problem with the USB Ports 3.0 on my laptop. None of them does not seem to work.There is a power, but nothing that I connect it works. I have no idea what driver should I use (Texas Instruments Driver does not work). Operating system i

  • no backlight screen is black except in front of the light of the Sun

    my inspiron 1525 works fine except for the fact that the screen has no backlight, I don't see anything unless I hold it in front of a very strong light, I tried to climb the brightness, but I don't think that's the prob can help me anybldy