How to join output of two or more query ?

suppose a query :
select count(id) COL1 from table_1 gives :
COL1
59and another query :
select count(id) COL2 from table_2 gives :
COL2
23.
HOW can i get this output :
COL1 COl2
59 23Edited by: bootstrap on Oct 14, 2011 2:08 PM

get each count in the sub-query:
SELECT
        SELECT
            COUNT(*)
        FROM
            job
    ) AS cnt_job,
        SELECT
            COUNT(*)
        FROM
            department
    ) AS cnt_department
FROM
    dual;
CNT_JOB                CNT_DEPARTMENT        
51                     4                     

Similar Messages

  • How does one simultaneously view two or more tables?

    When viewing a table, a tab is created. How does one create a second tab with which to view a second table?
    A related question - how does one enter and run two or more SQL statements to be viewed side-by-side (as in the above example with straight tables)?

    1) For table click the thumb tack an pin it. Then the next one will open in a new window.
    2) When you have 2 worksheets open drag the title bar to be on the left/right/top/bottom of that section. Then you'll have side-by-side worksheets.
    -kris

  • How to join GRPO with AP invoice thru query ?

    hi all,
    How to join GRPO with AP invoice in sql query ?
    Jeyakanthan

    Hi Jeyakanthan
    Are you using query in SAP Business One or outside the system? If you select the tables in SAP Business One as OPCH and OPDN then no inner join will appear, as the links sit on the line level. You will need PCH1 and PDN1. The link can be found in both directions, but bear in mind that 1 AP Invoice could be based on more than 1 Goods Receipt PO. For this reason the best approach is to start at the AP Invoice line level and use the BaseType and BaseRef fields to view which lines were pulled from which Goods Receipt PO's.
    Kind regards
    Peter Juby

  • How to combine output of two queries

    Hi, I have the following two OBIEE queries in one subject area:
    *1. number of daily new customers:*
    min(date)|customer unique number (aggregated in the pivot table as count distinct)
    day1 | 1000
    day2 | 1500
    *2. number of daily total customers:*
    date|count(distinct (customer unique number))
    day1 | 5000
    day2 | 9500
    How can I combine them based on date in one table?
    day1 | 5000| 1000
    day2 | 9500| 1500
    Thank you for your hints in advance

    *1. number of daily new customers:*
    *2. number of daily total customers:* Are these two measures coming from a same column in the presentation layer or two different columns? If two then simplay add two measures with your time dimension, it will give you your results. no need of combine with similar requests.

  • How can I work with two o more webcams in a java aplication ????

    Hi Everyone, I have an aplication that capture a frame from a webcam but I just wanna work with 2 o more webcam in the same code. In the JMF registry detect only one. I don't know what to do to solve the problem. Who know some tip about conect 2 webcams with JMF, please help me...!!!!!

    I suspect most slowdowns occur because of complex audio, not the size of the project. It sometimes helps to export the audio to an AIFF file, then re-import that file back into the project and place it in its own audio track. When you disable the audio of the other tracks, playback is improved.
    That makes it harder to edit a half-finished project, however. It's a technique best reserved for almost-finished projects.
    You could export the timeline to the camera, then re-import it to a new project. That will both make the project smaller and "flatten" its audio and video. Most clips will return as the clips they are now.
    70 minutes of video is ordinarily about 15GB, so something has increased the size substantially. (That's not normally a problem you have to worry about; the size of the project itself is probably not the problem.)
    Karl

  • Aggregating output of two BS in OSB Split join

    Hi,
    i am using split join to invoke two BS and after the each invoke activity in parallel branch i have placed assign activity and assigning output variable of in voke to reply activity output variable response.parameter . However in o/p i am getting response of only one BS. can any one help on how to aggregating output of two BS in OSB Split join . my output is coming like this
    <soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body>
    <ns2:NewOperationResponse xmlns:ns2="http://www.example.org/SjWsdl/">output</ns2:NewOperationResponse> -------->this is o/p of one BS. But i want to display O/p of two BS
    </soap-env:Body>
    </soap-env:Envelope>
    thanks in advance..
    Edited by: 11207106008 on Jun 26, 2012 10:11 PM
    Edited by: 11207106008 on Jun 26, 2012 10:12 PM
    Edited by: 11207106008 on Jun 26, 2012 10:13 PM

    Suppose you saves the response of each BS in variables: $response1 and $response2
    then you need to configure the replace action after the parallel branch like this:
    Replace node content of . in variable <variable name of reply variable> with <Expression>
    Where you can provide in <Expression> a simple XQuery expression to combine the two variable contents. (Choose a root node of your choice, I have used AggregatedResponse)
    <AggregatedResponse>
    {$response1, $response2}
    </AggregatedResponse>

  • Itunes for two (or more)?

    Just got my Nano today, and want to know if I can share the previously installed itunes that my daughter has been using? When she plugs her ipod into the computer, it automatically downloads her changes from itunes. How does it work with two or more units? Let's face it, I don't want her music and she doesn't want mine. Thanks.

    OR you could each make separate playlists for each person and only have each individual playlists selected for each ipod. http://www.apple.com/support/ipod/tutorial/ipgettingstartedt2.html
    or for more on using manual mode http://www.apple.com/support/ipod/tutorial/ipgettingstartedt3.html
    Another option would be in Windows every windows account gets it's own itunes library.

  • Scrolling two or more documents together

    how can I scrolling together two or more documents such as the "synchronized scrolling" in MS Office Word?
    - Thanks, Marco

    I use MS Word 2010. Open two documents> click View tab> Select View Side by Side> Synchronous Scrolling.
    bada boom bada bing

  • How to join four tables in Update query??

    Please how to join four tables in a single query to update one table row??

    You can use this syntax to update. Here updation of 1 column to a constant value (50) in multiple rows in Table A based on an associated 'SOURCE' value in table B
    Table A joins to Table B based on the TableA.definition_id = TableB.Att_Def_id
    like..
    update TableA
    set value =50
    where
    TableA.definition_id = TableB.Att_Def_id
    and TABLEB.Source = 'NEWPRODUCT'

  • SAP QUERY(SQ03/02/02) - how to join tables

    Hi MM Wizards,
    I would like to know how to join tables EINE & A017 through SAP Query?
    Thanks,
    Kaveri

    Hi Kaveri,
    A017 is a pooled table.  SAP Query does not support joins against Pooled tables.  You should stick to transparent tables if you want to use Query.
    You can do a direct read of A017, but you will just end up with a glorified SE16 display.
    You could have a programmer write some ABAP and place it into the 'extras' section in SQ02 to grab the additional data that you want, but once you have decided to enlist the aid of an ABAPer, it is better just to write a custom Z program from scratch.
    Regards,
    DB49

  • How to join two or more surveys to one big survey?

    Hello Experts,
    how do I join two or more littel surveys to one big survey with one tile and varios sections and subsections?
    Thanks for help.
    Cristina

    As I did not get any answer, I suppose it is not possible, unless you join the coding.

  • How two or more table used in smartforms

    Sir,
    Like to know how can i perform calculation in smartfrom if the fields is numeric and use two table, and also know about it is useful to use inner join or any other method in smartform for working with two or more tables simultaneously.
    plz, expalin with example

    hi
    you can use more than one table in smartform for that first you mention all the tables in the form interfaces and you have to mention the variables that you want to caliculate in the global definitions.
    For caliculation right click on ant text and in that we have flow logic option in that we can select which type of code you want to write and you have to create those inbetween two text fields where the values are there and the other one is where you want to display the result.
    in that code in input parameters we have to mention the variables which you want to use for caliculation and in output parameters mention the variables in which you want to store the result. And then we have to write the logic what ever we want.
    I hope this information will help you
    regards,
    Sreelatha Gullapalli

  • How to join two internal table rows in alternative manner into one internal table?

    How to join two internal table rows in alternative manner into one internal table?
    two internal tables are suppose itab1 &  itab2 & its data
    Header 1
    Header 2
    Header 3
    a
    b
    c
    d
    e
    f
    g
    h
    i
    Header 1
    Header 2
    Header 3
    1
    2
    3
    4
    5
    6
    7
    8
    9
    INTO itab3 data
    Header 1
    Header 2
    Header 3
    a
    b
    c
    1
    2
    3
    d
    e
    f
    4
    5
    6
    g
    h
    i
    7
    8
    9

    Hi Soubhik,
    I have added two additional columns for each internal table.
    Table_Count - It represents the Internal Table Number(ITAB1 -> 1, ITAB2 -> 2)
    Row_Count  - It represents the Row Count Number, increase the row count value 1 by one..
    ITAB1:
    Header 1
    Header 2
    Header 3
    Table_Count
    Row_Count
    a
    b
    c
    1
    1
    d
    e
    f
    1
    2
    g
    h
    i
    1
    3
    ITAB2:
    Header 1
    Header 2
    Header 3
    Table_Count
    Row_Count
    1
    2
    3
    2
    1
    4
    5
    6
    2
    2
    7
    8
    9
    2
    3
    Create the Final Internal table as same as the ITAB1/ITAB2 structure.
    "Data Declarations
    DATA: IT_FINAL LIKE TABLE OF ITAB1.          "Final Internal Table
    FIELD-SYMBOLS: <FS_TAB1> TYPE TY_TAB1,     "TAB1
                                   <FS_TAB2> TYPE TY_TAB2.     "TAB2
    "Assign the values for the additional two column for ITAB1
    LOOP AT ITAB1 ASSIGNING <FS_TAB1>.
         <FS_TAB1>-TABLE_COUNT = 1.             "Table value same for all row
         <FS_TAB1>-ROW_COUNT = SY-TABIX. "Index value
    ENDLOOP.
    "Assign the values for the additional two column for ITAB2
    LOOP AT ITAB2 ASSIGNING <FS_TAB2>.    
         <FS_TAB2>-TABLE_COUNT = 2.                  "Table value same for all row
         <FS_TAB2>-ROW_COUNT = SY-TABIX.      "Index value
    ENDLOOP.
    "Copy the First Internal Table 'ITAB1' to Final Table
    IT_FINAL[] = ITAB1[].
    "Copy the Second Internal Table 'ITAB2' to Final Table
    APPEND IT
    LOOP AT ITAB2 INTO WA_TAB2.
    APPEND WA_TAB2 TO IT_FINAL.
    ENDLOOP.
    "Sort the Internal Table based on TABLE_COUNT & ROW_COUNT
    SORT IT_FINAL BY  ROW_COUNT TABLE_COUNT.
    After sorting, check the output for IT_FINAL Table, you can find the required output as shown above.
    Regards
    Rajkumar Narasimman

  • Join two or more xml files

    I want to join two or more xml files and create a nw xml or html file w/o using java!!
    Is it possible with only xsl. if yes how?
    Raju

    Sure it's possible with XSLT.
    Just use the document() function to refer to one or more additional source documents. I recommend using an <xsl:variable> to capture the secondary document in a variable so you can easily refer to it any number of times in the stylesheet.
    So, at the top-level of your stylesheet, just do:
    <xsl:variable name="otherDoc" select="document('otherDoc.xml')"/>
    Then anywhere you want to select nodes from the secondary document (will the full power of XPath), just start your XPath expression with the $otherDoc variable like this:
    select="$otherDoc/something/somethingelse[somepredicate-if-needed]"
    In this way you can combine the values of the current node in the main source document to lookup corresponding nodes in the secondary document and do joins this way.

  • How to join two pl/sql tables .,.,,Urgent pls help

    Hi,
    Please tell me how to join to pl/sql tables with example
    thanks
    asp

    If your main intention is to get the common records/or getting whole records from the 2 different pl/sql arrays then , pls check this piece of code & explanation
    The SQL language has long offered the ability to apply set operations (UNION, INTERSECT, and MINUS) to the result sets of queries. In Oracle Database 10g, you can now use those same high-level, very powerful operators against nested tables (and only nested tables) in your PL/SQL programs and on nested tables declared as columns inside relational tables.
    Let's take a look at some of the syntax needed to do this, starting with UNION.
    First, I create a schema-level nested table type:
    CREATE OR REPLACE TYPE strings_nt
    IS TABLE OF VARCHAR2(100);
    Then I define a package and within it create and populate two nested tables of this type, each containing some of my father's and my favorite things:
    CREATE OR REPLACE PACKAGE favorites_pkg
    IS
    my_favorites strings_nt
    := strings_nt ('CHOCOLATE'
    , 'BRUSSEL SPROUTS'
    , 'SPIDER ROLL'
    dad_favorites strings_nt
    := strings_nt ('PICKLED HERRING
    , 'POTATOES'
    , 'PASTRAMI'
    , 'CHOCOLATE'
    PROCEDURE show_favorites (
    title_in IN VARCHAR2
    , favs_in IN strings_nt
    END;
    In this package, I also include a procedure to show the contents of a strings_nt nested table. This will come in very handy shortly.
    By defining these collections in a package, outside any program, they persist (they maintain their state and values) for the duration of my session or until I change or delete them. This means that I can now write programs outside the package to manipulate the contents of those collections.
    Note that this package has been simplified for the purposes of presenting collection functionality. In a production application, you should always take care to "hide" your package data, as with these collections, in the package body, and then provide procedures and functions to manage the data.
    Suppose, for example, that I would like to combine these two collections into a single collection of our favorites. Prior to Oracle Database 10g, I would have to write a loop that transfers the contents of one collection to another. Now, I can rely on the MULTISET UNION operator, as shown below:
    DECLARE
    our_favorites
    strings_nt := strings_nt ();
    BEGIN
    our_favorites :=
    favorites_pkg.my_favorites
    MULTISET UNION ---- Use INTERSECT , if you want to know common records
    favorites_pkg.dad_favorites;
    favorites_pkg.show_favorites (
    'ME then DAD', our_favorites);
    END;
    The output from this script is:
    ME then DAD
    1 = CHOCOLATE
    2 = BRUSSEL SPROUTS
    3 = SPIDER ROLL
    4 = PICKLED HERRING
    5 = POTATOES
    6 = PASTRAMI
    7 = CHOCOLATE
    ------------------------------

Maybe you are looking for

  • HT1766 My Iphone5 wont back up , it gives me an error message Itunes could not back the Iphone5 beacuse an error occurred. What can I do

    it gives me an error message Itunes could not back the Iphone5 beacuse an error occurred. What can I do

  • Generating subtotal in ALV...

    Hi, I am using Function modules to display my data in ALV. I also want to perform a subtotal on a field named dmbtr. I am not sure what is wrong but when I try to execute my code I get the error, "Field Catalog  not found". Is my logic wrong or call

  • JavaScript dosent work with PDF

    Hei, I have put javascript in my pdf form. I have included it in button, but when I push the button nothing happend (Eny error message dosent occure javascript itself). Does enyone know why so? Have I configurate something in my pdf form... Thank you

  • Event ID 9 Error CM 4.1(3)

    Anyone know how to resolve this warning I am getting in my event logs? Event Type: Warning Event Source: Active Server Pages Event Category: None Event ID: 9 Date: 6/18/2007 Time: 6:37:34 AM User: N/A Computer: COL-CM-P Description: Warning: IIS log

  • Two sound outputs on one box

    Is it possible for one to configure a system to use two sound outputs: 1) HDMI and 2) standard RCA stereo out?  My goal would be to have the main system sound use the HDMI (applications like mplayer for example) and to also have mpd to use the standa