There are two select statement, which are as follows: 1) select project id, the name of ppm.pm_projects project_name and request_id 2) select id, name from request_type_name to kcrt_request_details. There is a column called entity that allows you to store

There are two select statement, which are as follows: 1) select project id, the name of ppm.pm_projects project_name and request_id 2) select id, name from request_type_name to kcrt_request_details. There is a column called entity that can store a value i.e. project or request. I want to write a select statement containing a condition that is if the entity name is project and then run the select statement 1 otherwise, if the name of the entity's request, then run the select statement 2. All this must be written in a select statement. Can someone help me how to write this select statement type.

Hello

Hello

2726057 wrote:

... There is a column called entity that can store a value i.e. project or request. ...

In which table is this column?  Assuming that it is in a table called entity_table, you can do something like this:

SELECT project AS id

project name AS the name

OF ppm.pm_projects

WHEN THERE IS)

SELECT 1

Of entity_table

Entity WHERE = "Project".

)

UNION ALL

SELECT request_id ID

request_type_name AS name

OF kcrt_request_details

WHEN THERE IS)

SELECT 1

Of entity_table

Entity WHERE = 'ask '.

)

;

This does not have anything on the number of lines is entity_table, or what are the values in the column of the entity.  In other words, the query works in all cases.  If any line in entity_table entity = 'Project', then the pm_projects data will be included in the result set.  If any line in entity_table entity = 'Request', kcrt_request_details data will be included.

I hope that answers your question.

If this isn't the case, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.

Explain, using specific examples, how you get these results from these data.

Always say what version of Oracle you are using (for example, 11.2.0.2.0).

See the FAQ forum: https://forums.oracle.com/message/9362002#9362002

Tags: Database

Similar Questions

  • Is there a plan I can purchase that allows you to convert a PDF file that is greater than 100 MB?

    Is there a plan I can purchase that allows you to convert a PDF file that is greater than 100 MB?

    Hey samp86509698,

    I'm sorry, but the maximum file size of the PDF file that can be exported is 100 MB.

    If you have Acrobat, you can reduce the size of the file and then export to other formats.

    Kind regards

    Ana Maria

  • I want to move a large number of photos but don't want to unique, click each photo. I know there is a simple control function that allows to select groups of files with ' two'clicks ', as opposed to the selection of each file. Suggestions?

    I want to spend a lot of photos (they are in order) but and do not want to have to click to move each photo. I know there is a simple control function that allows to select groups of files with ' two'clicks ', as opposed to the selection of each file. Suggestions? I know it's apple 101, but I don't remember what order to press the button command, or shift, or other. Thank you

    Select the first file, then hold down the SHIFT key, and then click the last file. Or, select any file in the folder and then press command + A

  • Can someone help me with a Code that allows you to hide all but the first few fields when the form opens

    My form has a section (subform) on top that is always open and then underneath it is dynamic and I want some subforms and sections to open based on users to input. I use action Builder to open the screen and have all the fields that are hidden, but I have too much subforms and must hide individually all subforms. Is there a code that allows you to hide all fields for me when the form opens, and then I can use action Builder to open just what I need based on a drop-down list button or radio?

    Thank you!

    Hello

    Using LockAllFields of Paul's example, you could place the JavaScript code within the root node docReady event (normally 'form1').

    Please note that the last line is the presence of one of the subforms to visible return. Let's call it ShowThisSubform.

    // Declare some variables
    var allChildElements;
    var intNumElements;
    var currentElement;
    var j;
    
    // Get all the child nodes of the parent element (the root node/"form1")
    allChildElements = this.nodes; // "this" will use the element where the script is placed
    
    //Total number of element in the object
    intNumElements = allChildElements.length;
    
    // Loop through all the child elements
    for (j=0; j< intNumElements; j++) {
         currentElement = allChildElements.item(j);
         // If the element is a subform we'll hide it
         if (allChildElements.item(j).className == "subform") {
              allChildElements.item(j).presence = "hidden";
         }
    }
    
    // Show one of the subforms
    ShowThisSubform.presence = "visible";
    

    Niall

  • I'm looking for the Mac key combination which is equivalent to Alt + Tab in Windows that allows you to choose Open Windows (toggle).

    I'm looking for the Mac key combination which is equivalent to Alt + Tab in Windows that allows you to choose Open Windows (pass) but I can't find this info.  I hope that someone will tell me what combination of keys and as a bonus, where I can find it in the menu help. Thank you!

    The standard keyboard shortcuts are listed here:

    Keyboard shortcuts in Mac - Apple Support

    You can also define your own in System Preferences > keyboard

  • Illustrator CS4 or CC, effect that allows you to quickly change vector vector colored grayscale?

    In Illustrator CS4, or CC, there is an effect that allows you to quickly change a color vector illustration in a grayscale vector illustration?

    Edit > edit colors >. convert to grayscale

  • Do you need to be on the same account of WiFi for phone and Mac that allows you to delete photos?

    When my Macbook Pro is on the WiFi and my iPhone 6 s + is on cell phone, I noticed that if I delete the photos within the program of Photos on my Mac they do not get deleted from my iPhone. However, a few hours later when I get home and check my phone, and I'm on Wifi for both devices, the photos have disappeared. Do you need to be on the same account of WiFi for phone and Mac that allows you to delete photos?

    Thank you.

    Devices can be on different wifi networks.

    Your question is that the phone will not be synchronized using cellular data and will wait until it connects to a wifi network, but this can be any wifi network.

  • I bought the version of Acrobat that allows you to edit PDF files.  I currently pay $15 / month.  I bought a new computer and downloaded the free version of Acrobat.  How to install the version that I pay $15 / month?

    I bought the version of Acrobat that allows you to edit PDF files.  I currently pay $15 / month.  I bought a new computer and downloaded the free version of Acrobat.  How to install the version that I pay $15 / month?

    Launch Acrobat, on the first window, click on "license this software" and enter your Adobe ID, associated with the subscription and password.

  • I recently bought creative package of cloud of adobe and now I get a message 'we are in trouble, check your membership' whats the story? I am registered and I am charged!

    I recently bought creative package of cloud of adobe and now I get a message 'we are in trouble, check your membership' whats the story? I am registered and I am charged!

    Hello

    Please follow we are having trouble verifying your membership.

    Hope that helps!

    Kind regards

    Sheena

  • Is there a program that allows you to copy music files titiles without actually transferring the music itself?

    I have several GB of music stored on my computer. I want to compile a list of this music.  I know that I can type the information into word or excel documents but y at - it a proggram that is available that would allow me to copy the information already on the computer to compile the list is my music. I tried to copy the titles but al does is copy the music together. (example: song title: puppet man artist: Tom Jones.) If I tried to copy the information to a file for which it is stored, it would actually copy the file and not only the tiitle. Any suggestions?

    Hello

    You may need to find a program online. Use your favorite search engine to search for a program.

  • Cards MicroSD to blackBerry Smartphones allow you to store SMS text messages more?

    I can't find the answer anywhere. It is said that MicroSD cards allow more storage for photos, MP3s, ringtones, etc, but it says nothing about SMS messages. A MicroSD card will allow me to store text messages SMS more on my phone?

    SD cards can be used to store multimedia files as well as files on your PC. Because SMS messages are stored in the device memory, they can be stored on a media card

  • How can I create a field that allows you to change by a mouse click?

    THE field is blank, click first between "/", then click on entry changes to 'X' and third click changes in an empty field.  Bascially I want a field that allows to use to scroll with the mouse click.

    It is possible. What you describe can be considered a multistate checkbox. The following demo illustrates a number of different implementations: https://acrobat.com/#d=xRrSL3NBQy2hu5qFANPvqA

    You will have to study the code in different areas (box/text for the button combinations) and at the level of the document to understand how it works.

  • a product that allows you to do a search?

    A product that allows a search of a PDF file?

    Adobe Reader, provided that the document contains the actual text.

    If the document is a digital image, there is no text in itself.  To recognize text in a scanned image, you must perform OCR using Adobe Acrobat.

  • Button that allows you to select images

    I was wondering how I could make a button (this is a picture of himself) who, when you press on, allows you to scroll through the other images.

    For example... say the first picture is a cat, you click on it, it turns into a dog, you click on it again, turns into a monkey, etc.. He would eventually return to the image of the cat.

    Tried this, I'm completely lost.

    A second question would be; How can I make sure when I press the button/click on the image, a menu in the flash document appears and allows a person the image they want to charge in this position?

    Thanks in advance.

    PS: question no, really, but I was wondering how to set up a way for people to save the State of the flash document to share with each other. (similar to the flash game at the ) http://ArmorGames.com/play/3614/crush-the-Castle called Crush The Castle. For example, after loading the game, go in "Build your own" and then in the menu on the left with the objects, he has a backup and loading screen where you can copy and paste a code.)

    This is not how you must create a movieclip button that is reusable and you should not follow the advice of pjsb.

    Here is an example of how to create a button that you can use repeatedly: www.kglad.com/Files/forums/Untitled-1.fla

  • I need the circular activity icon that allows you to be in the classic toolbar.

    Hi, I, m the need for points circular icon that notifies you that an activity is underway. Please let me know if I can get it back. Thank you very much.

    You want the back throbber. In my view, that it has been deleted. You can get a replacement of:

Maybe you are looking for