Using the result of a subselect in another part of the select

Does anyone know if 9i can use the results of a subselect in a select in another part of the select. For example:
select x, (select y from sometable) as ssvar, z, (select abc from someothertable where somecolumn=ssvar) from yetanothertable
Anyone? We have a bunch of Sybase queries we are porting over and they use this extensively. It looks like the 9i docs say this may not be possible, but I really wanted to be sure before I rewrite the queries.
-Lou

From your example, an inline view seems most appropriate to me...
select max_table.table_name, column_name
from user_tab_columns, (
select max(table_name) as table_name
from user_tables) max_table
where max_table.table_name = user_tab_columns.table_name
However, if your actual usage is more complicated, you might want to look at 'subquery factoring' (new in 9i). It doesn't really do much good for this example but here's the syntax...
with max_table as (
select max(table_name) as table_name
from user_tables)
select max_table.table_name, column_name
from max_table, user_tab_columns
where user_tab_columns.table_name = max_table.table_name
Richard

Similar Messages

  • My Photoshop CS 5 has some strange actions when I copy a portion of a photo using the clone stamp  to transfer to another part of the image. It carries the entire layer (not just the stamps selection) across the screen and I cannot place it where I need t

    My Photoshop CS 5 has some strange actions when I copy a portion of a photo using the clone stamp  to transfer to another part of the image. It carries the entire layer (not just the stamps selection) across the screen and I cannot place it where I need to. It appears as if I selected the entire layer on purpose (which I did not)
    The below items appeared when I opened Photoshop CS 5:
    “Photoshop has encountered a problem with the display driver and has temporarily disabled G & U enhancements. Check the video card malfunctions website for latest software. GPU enhancements can be enabled in the performance panel of preferences.”
    (I believe this started after the automatically updated Windows was applied. It was coincident with the before mentioned problem . . . but I don’t really know if it had anything to do with it. )

    For the Clone Stamp problem, check the Clone Source panel and Clipped is probably unchecked.
    If so, check Clipped and see if that makes a difference.
    (Window>Clone Source)
    As to the video card problem:
    Which version of windows are you using?
    What is the make and model of your graphics card?
    Do you know which update windows installed?

  • Can I use the result of a query in another query of the same cube?

    Hello everybody;
    I have the following case. In query "A", I have used in rows a structure, whit a last formula named “Total A”, in another query "B", I need to used the result of “Total A”.
    Can anybody help me?
    Thanks in advanced.
    Mariana Serrano

    Hi Mariana,
    You can change local structures into reusable structures in any existing query by selecting the structure and, choosing Save as... from the context menu and then entering a technical name and a description in the Save Structure as... dialog box.
    You can change reusable structures that you are using in a query into local structures by selecting the structure and choosing Remove Reference from the context menu.
    Also go through this link:
    http://help.sap.com/saphelp_sem40bw/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Best Regards,
    DMK
    *Assign point if it helps...

  • I am using Lightroom 5 and am hapy about it, but recently I hav encountered a problem when trying to edit an image in another program, i.e. Elements. I used the clone tool, saved the result and went back to Lightroom to open the image there. I did find a

    I am using Lightroom 5 and am hapy about it, but recently I hav encountered a problem when trying to edit an image in another program, i.e. Elements. I used the clone tool, saved the result and went back to Lightroom to open the image there. I did find a second copy, but this is identic with the one I already had in Lightroom, and I can see noe result of the clone process.

    At the moment I would say it is uncertain whether Acrobat is completely ignoring the change, or whether the changes you are making aren't affecting the ink density. I have a suggestion for a test you could make to see which is the case.
    When editing in Photoshop just add a box or mark on the image, for your tests.
    - If this box does not appear in Acrobat, you know Acrobat is not seeing the edit
    - If this box does appear in Acrobat, you know the problem is that your tool for changing ink densities is not taking effect.

  • My cursor flits away to another part of the screen while I am using it.

    When moving the cursor around the screen with the mouse, often the cursor will just flit away to another part of the screen and I have to move the mouse around in a circle to find it an drag it back to where I was using it. Any ideas what is causing this?

    I believe this has been attributed to some shift in the state of your wifi connection. It usually happens for me when something is being downloaded, or a download finishes. Sometimes the wifi "fan" in the menu bar is changing from 3 to 4 bars, or 4 to 3. Often I don't know what it is changing, but the cursor just jumps.
    I searched for this problem (months ago) and someone on the forum said it was the wifi doing it. Turn off the wifi and connect by ethernet and see if it continues. With the layout of my office, I'm not able to try that, so I just put up with it. Seems it doesn't do it as often anymore, but it does continue.
    Hope this is helpful. Joel.

  • When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    When I send an email with Mail, I often confuse the account which I'm using. The result is that I send a message with the wrong account! Is there a way to avoid this (for example a reminder before the email is sent)?

    Hi, thanks for the answer, I did that already. Unfortunatly this doesn't help me at all, as I often forget to check the menu. For me composing the message is writing the text, the subject, the person to who is addressed and than press "send".
    I often forget to check the "from", and this is a problem because the software select itself one of the accounts.
    Isn't there a way at least to put as a default a blank field instead of one of the accounts? or an account which doesn't work so if I forget to specify the "from" I will be rnotofied that the message can't be sent.
    I guess this could be a rather common problem for many people!
    Thanks
    Sergio

  • I have a shuffle. When I plug it into Itunes, it tells me that it has not been ejected properly, and it will not recognize the Ipod. I have turned off the computer, and tried this with another shuffle with the exact same results. Any ideas?

    I have a shuffle. When I plug it into Itunes, it tells me that it has not been ejected properly, and it will not recognize the Ipod. I have turned off the computer, and tried this with another shuffle with the exact same results. Any ideas?

    Do you remeber the exact (or close to it) wording of the error message?
    Try manually placing the iPod in Recovery mode and then try to restore
    Next try DFU mode.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    You can also try another computer  to help determine if you have an iPod or computer problem.

  • Is there a way to filter a drop down list by using the result main data display from"GetUserProfileByName" when open the form.

    Hi 
    Is there a way to filter a drop down list by using the result main data display from"GetUserProfileByName" when open the form?
    The second source has a huge list of company names that can be narrrow by email work. 
    background:SP 2010 and Infopath 2010
    CRISTINA&amp MICROSOFT Forum

    I'm not sure if I understood your question clearly but here is a good resource on how to get attributes from "GetUserProfileByName" web services:
    http://blog.mangroveweb.com/pre-populating-an-infopath-from-with-mysql-data-using-a-net-web-service/using-sharepoints-getuserprofilebyname-web-service-to-retrieve-ad-account-information/
    Regarding filtering dropdown list then this could be done by applying form on-load rules. 
    Hope this helps

  • How do I create a 1d array that takes a single calculation and insert the result into the first row and then the next calculation the next time the loop passes that point and puts the results in thsecond row and so on until the loop is exited.

    The attached file is work inprogress, with some dummy data sp that I can test it out without having to connect to equipment.
    The second tab is the one that I am having the problem with. the output array from the replace element appears to be starting at the index position of 1 rather than 0 but that is ok it is still show that the new data is placed in incrementing element locations. However the main array that I am trying to build that is suppose to take each new calculation and place it in the next index(row) does not ap
    pear to be working or at least I am not getting any indication on the inidcator.
    Basically what I am attempting to do is is gather some pulses from adevice for a minute, place the results for a calculation, so that it displays then do the same again the next minute, but put these result in the next row and so on until the specifiied time has expired and the loop exits. I need to have all results displayed and keep building the array(display until, the end of the test)Eventually I will have to include a min max section that displays the min and max values calculated, but that should be easy with the min max function.Actually I thought this should have been easy but, I gues I can not see the forest through the trees. Can any one help to slear this up for me.
    Attachments:
    regulation_tester_7_loops.vi ‏244 KB

    I didn't really have time to dig in and understand your program in depth,
    but I have a few tips for you that might things a bit easier:
    - You use local variables excessively which really complicates things. Try
    not to use them and it will make your life easier.
    - If you flowchart the design (very similar to a dataflow diagram, keep in
    mind!) you want to gather data, calculate a value from that data, store the
    calculation in an array, and loop while the time is in a certain range. So
    theres really not much need for a sequence as long as you get rid of the
    local variables (sequences also complicate things)
    - You loop again if timepassed+1 is still less than some constant. Rather
    than messing with locals it seems so much easier to use a shiftregister (if
    absolutely necessary) or in this case base it upon the number of iterations
    of the loop. In this case it looks like "time passed" is the same thing as
    the number of loop iterations, but I didn't check closely. There's an i
    terminal in your whileloop to read for the number of iterations.
    - After having simplified your design by eliminating unnecessary sequence
    and local variables, you should be able to draw out the labview diagram.
    Don't try to use the "insert into array" vis since theres no need. Each
    iteration of your loop calculates a number which goes into the next position
    of the array right? Pass your result outside the loop, and enable indexing
    on the terminal so Labview automatically generates the array for you. If
    your calculation is a function of previous data, then use a shift register
    to keep previous values around.
    I wish you luck. Post again if you have any questions. Without a more
    detailed understanding of your task at hand it's kind of hard to post actual
    code suggestions for you.
    -joey
    "nelsons" wrote in message
    news:[email protected]...
    > how do I create a 1d array that takes a single calculation and insert
    > the result into the first row and then the next calculation the next
    > time the loop passes that point and puts the results in thsecond row
    > and so on until the loop is exited.
    >
    > The attached file is work inprogress, with some dummy data sp that I
    > can test it out without having to connect to equipment.
    > The second tab is the one that I am having the problem with. the
    > output array from the replace element appears to be starting at the
    > index position of 1 rather than 0 but that is ok it is still show that
    > the new data is placed in incrementing element locations. However the
    > main array that I am trying to build that is suppose to take each new
    > calculation and place it in the next index(row) does not appear to be
    > working or at least I am not getting any indication on the inidcator.
    >
    > Basically what I am attempting to do is is gather some pulses from
    > adevice for a minute, place the results for a calculation, so that it
    > displays then do the same again the next minute, but put these result
    > in the next row and so on until the specifiied time has expired and
    > the loop exits. I need to have all results displayed and keep building
    > the array(display until, the end of the test)Eventually I will have to
    > include a min max section that displays the min and max values
    > calculated, but that should be easy with the min max function.Actually
    > I thought this should have been easy but, I gues I can not see the
    > forest through the trees. Can any one help to slear this up for me.

  • Is there another way to close apps other than deleting them from the multitask bar.....I have a small crack in the bottom of my screen and that part of the screen does not recognize the touch.  :(

    Is there another way to close apps other than deleting them from the multitask bar.....I have a small crack in the bottom of my screen and that part of the screen does not recognize the touch. 

    There's generally no reason to be closing them that way at all. The apps you see in the recents bar are just that, apps that you used recently. Most of them are doing absolutely nothing. The only apps that are really doing anything in the background are ones that play music and ones that are using location services. Just leave them be.
    Best of luck.

  • How can I include the results are coming from a new thread, in the main sequence report?

    Hi,
    I have a main sequence which calls other sequence running in a new thread.
    I cannot see the results (limit test etc.) comming from that sequence.
    Is there any trick to it?
    Andras

    Hi again Andras.
    I got a reply from the technical support. I hope this help you.
    To include in main report the results of your test in another thread you must follow these steps:
    1.- Right click on the sequence call where you create the new thread. In "Specify Module" panel, just right "Run sequence in a new thread" press "Settings" button and disable "Automatically wait for the thread to complete..."
    2.- At the end of your main sequence add a new "synchronization - wait" step. Configure your wait, selecting in the upper ring tab "wait for thread".
    3.- Then select below "specify by sequence call" and pick over your thread name.
    With these changes your main sequence will add the results from your thread to your main sequence report.
    I hope it works for you. (but sadly it doesn't work for me)

  • How can I copy a part of the picture and paste this piece on top of another part of the same picture? ta

    How can I copy a part of the picture and paste this piece on top of another part of the same picture? ta

    select the section you want to copy (marquee tool or lasso tool) and either go to edit copy or use control c create a new layer in layers (top menu bar) or Control shift N and paste using control V;  or edit > paste.

  • The folder is already attached to another index of the same type

    Hi,
    I deleted an index in the portal and want now to created a new index with the same datasource, I get the following errormessage:
    The folder is already attached to another index of the same type: datasourcename
    Does anybody have an idea?
    BR
    Steven

    Hi,
    make sure you really don't see the index in KM anymore.
    If this is the case you could try to delete the index with the TREX Admin Tool on the TREX host. Maybe first just have a look, if on the TREX side the index is still there. This would mean, that in KM the index was deleted but not on TREX.
    But you  should be sure what you do, when using the admin tool!
    Maybe you should also test, if this was just a temporary problem, or if it occurs always when you delete an index.
    Deleting an index should work fine from KM and using the admin tool should only be needed for this in rare cases.
    Regards,
    Sascha

  • I need to replace a color on my image with a specific color from another part of the image.  How?!

    I have spent over 2 hours trying to figure out how to replace a color on one part of my image with a specific color shown on another part of the image.  So far I have been able to go to "Replace Color" on my Adobe Photoshop version, but it seems that I can only change the hue and brightness of the color that it currently is.  I need to use a specific color so this does not help me.  Does anyone know how to complete the task I am referring to?
    Also, please keep in mind that I am using Adobe Photoshop 6.0, not a fancy cs version or anything.  So it's pretty old school...
    Any help/feedback is greatly appreciated!  Thank you.

    Hi brookehelene,
    You might consider making a selection the object and using a color fill layer set to the color blend mode instead of replace color.
    I used the same picture as kendallplant did and changed the color on the same flower by sampling the pink color from the flower to the right)
    (click on the screenshots below for larger views)
    1. Select>Color Range
       (i used color range because the dialog is somewhat similar to the replace color dialog, except one is making a selection instead of replacing a color)
       (there are many other ways to make the selection such as the magic wand, so if your more familar with the other selection tools you can use those instead to make your selection)
    2. Use the eyedroppers and fuzziness slider in the color range dialog to make the selection of the object.
       (in the screenshot below the white areas are selected and black areas are not)
       (your selection probably won't be perfect, but you can paint on the layer mask to refine the selection)
    3. After you press the okay in the color range dialog you'll see the selection (marching ants)
       At the bottom of the layers palette press the Create New Fill or Adjustment Layer icon
       to reveal a list and choose Solid Color.
       Then use the eyedropper to sample a color from your image and press ok.
       Change the Blend mode for the color fill layer to Color (top of the layers palette)
    4. As you can see a lot has been selected besides the flower.
        To refine the areas of color, paint on the layer mask with the paintbrush tool.
        Use white to add the color or black to subtract the color
        You can press the D key on the keyboard to get the default colors (black and white) in the toolbox
        and press the X key to switch between the two when painting on the layer mask.
    Even though the above takes longer you can easily change the color or modify the areas that you want to change the color on.
    To change the color you can double click on the color fill icon in the layers panel.
    You can also use other layer blend modes besides color such as hue, so you might try some of the others and see what they do.

  • I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?

    Hello everybody,
    I would like to copy all the songs from one Ipod into another. All the songs are into my Itunes account, I tried to drag and drop the songs from the old Ipod to the new one but it doesn't work. Is there a way to do it ?
    I share one Itunes account with other people from my family and one person would like to keep the same songs on the new Ipod as the ones which were on the old one.
    Thanks in advance for your answer.
    Yan

    Hello Chris,
    Thanks for your answer. I was hoping for an easier answer. Too bad there is no drag and drop solution, it would have been much easier.
    Thanks for answering so fast.
    Bye.
    Yan

Maybe you are looking for