How Can I write Query like this

My Dears:
I want to reduce some formula in my report by merge these formula in my query
I want to know how can I wrirte a query in query
for example
select empno,ename,(select sal from emp ee where ee.empno=mm.empno ) from emp mm
the previous query I know it not logic but I need the way
my DB 10G r2
thanks in advance

Apart your remark nothing seems to be wrong with your query. Did you try it?
Regards
Etbin

Similar Messages

  • How can i generate xml like this?

    Hi all,
    How can i generate xml like this & i need to send it to via HTTP :
    <mms>
                 <subject>message subject</subject>
                 <url_image>http://image_url</url_image>
                 <url_sound>http://sound_url</url_sound>
                 <url_video>http://video_url</url_video>
                 <text>message text</text>
                 <msisdn_sender>6281XYYYYYY</msisdn_sender>
                 <msisdn_receipient>6281XYYYYYY</msisdn_receipient>
                 <sid>to be define later</sid>
                 <trx_id>Unique number</trx_id>
                 <trx_date>yyyyMMddHHmmss</trx_date>
                 <contentid>see note</contentid>
    </mms>& how can i get the value of the sid (for example)?
    I hav tried to generate that xml by using StringBuffer & append, but it's not what i mean...
    Anyone can help me?

    Ok...i got it. But i still hav some problems.
    This is the sample code that i used :
    public class XMLCreator {
         //No generics
         List myData;
         Document dom;
            Element rootEle, mmsEle, mmsE;
            StringWriter stringOut;
            mms mms;
         public XMLCreator(String subject, String image, String sound,
                    String video, String text, String sender, String recipient,
                    int id, String date, String contentid) {
              mms = new mms(subject, image, sound, video, text, sender,
                            recipient, id, contentid, date);
                    createDocument();
         public void run(){
              createDOMTree();
              print();
         private void createDocument() {
              //get an instance of factory
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              try {
              //get an instance of builder
              DocumentBuilder db = dbf.newDocumentBuilder();
              //create an instance of DOM
              dom = db.newDocument();
              }catch(ParserConfigurationException pce) {
                   //dump it
                   System.out.println("Error while trying to instantiate DocumentBuilder " + pce);
         private void createDOMTree(){
              //create the root element <Mms>
              rootEle = dom.createElement("mms");
              dom.appendChild(rootEle);
              createMmsElement(mms);
         private Element createMmsElement(mms b){
              Element subjectEle = dom.createElement("subject");
              Text subjectText = dom.createTextNode(b.getSubject());
              subjectEle.appendChild(subjectText);
              rootEle.appendChild(subjectEle);
              //create url_image element and author text node and attach it to mmsElement
              Element imageEle = dom.createElement("url_image");
              Text imageText = dom.createTextNode(b.getUrl_image());
              imageEle.appendChild(imageText);
              rootEle.appendChild(imageEle);
              // & etc....
              return rootEle;
          * This method uses Xerces specific classes
          * prints the XML document to file.
         private void print(){
              try
                   //print
                   OutputFormat format = new OutputFormat(dom);
                   format.setIndenting(true);
                            stringOut = new StringWriter();
                   //to generate output to console use this serializer
                   XMLSerializer serializer = new XMLSerializer(stringOut, format);
                   //to generate a file output use fileoutputstream instead of system.out
                   //XMLSerializer serializer = new XMLSerializer(
                   //new FileOutputStream(new File("mms.xml")), format);
                   serializer.serialize(dom);
              } catch(IOException ie) {
                  ie.printStackTrace();
            public String getStringOut() {
                return stringOut.toString();
    }when i tried to show the stringOut.toString() in my jsp, it's only showed string like this :
    The Lords Of The Ring http://localhost:8084/movie/lotr.3gp 6281321488448 6281321488448 123 0 20070220114851 LOTR.
    1. Why this is happen?i want to generate xml which its format is like above.
    2. How can i send this xml (put in msg parameter) using jsp (via web) without creating the mms.xml?
    3. if i want to set the msg parameter equal to mms.xml - means that msg = mms.xml, what is the data type for msg? is it an object or anything else?
    Thx b4 in advance...

  • How can I do sth like this ${requestScope.list.size} ?

    Hi, I have 2 attributes which I pass like this
    requsest.setAttribute("startPoint", 3);
    request.setAttribute("myList", myList);
    where myList is a ArrayList filld with objects. On jsp page I want to count 2 values first and last number:
    <c:set var="firstNumber" value="${requestScope.startPoint+1}"/> - this works fine.
    <c:set var="lastNumber" value="${requestScope.startPoint+requestScope.myList.size}"/> - this is impropper.
    How can I use as integer size of list which is passed as request attribute. Is this possible?
    I would appreciate any hepl.

    Hang on. For such things you can build your own EL functions - it is very easy and involves only 4 steps.
    1. Write a class containing a method (must be static) to calculate size of any list.
    [Put the class in /WEB-INF/classes, so your file will reside as /WEB-INF/classes/myfunctions/MyFunctions.class]
    package myfunctions;
    import java.util.List;
    public class MyFunctions{
         public static int getListSize(List list){
              return list==null?0:list.size();
    }2. In your taglib add an entry (in case you don't have already create one) for the EL function:
    [Say our taglib is mytags.tld in /WEB-INF]
    <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
      http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
         version="2.0">
         <tlib-version>1.0</tlib-version>
         <short-name>MyTagLib</short-name>
         <function>
              <description>List Size</description>
              <name>size</name>
              <function-class>myfunctions.MyFunctions</function-class>
              <function-signature>int getListSize(java.util.List)</function-signature>
         </function>
    </taglib>3. Now in your JSP add following line to use your new EL function:
    <%@taglib uri="/WEB-INF/mytags.tld" prefix="mt"%>4. And use as:
    <input type=text value="${mt:size(requestScope.myList)}" />Note that there no issues using JSTL EL functions. My intention is to resolve your problem and at the same time to give you a glance how to write and use your own EL functions (might be useful in future).
    Thanks,
    Mrityunjoy

  • Help: How to create a query like this?

    I am working on a report and I am facing on a question like this:
    TABLE TEST has two columns A and B
    A B
    2 INFO21
    2 INFO22
    3 INFO31
    3 INFO32
    3 INFO33
    I'd like to create a query which will return
    A INFO
    2 INFO21, INFO22
    3 INFO31, INFO32, INFO33
    Please help.
    Thank you in advance
    Jimmy

    A lot of pretty fine examples here:
    http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
    Rgds.

  • My password protected phone was stolen and hacked into.  How can I prevent someone like this from hacking into/getting around the passcode?  They now have access to everything on my phone (I had a passcode to prevent this)

    How can you prevent a hacker from bypassing your iphone passcode?  My phone was stolen and someone hacked in and has access to everything on my phone and turned off "find my iphone."  This is exactly what I wanted to prevent from happening and the reason why I had a passcode. 

    Turn on "Erase Data" in Settings>Passcode. That will wipe the data after 10 incorrect password attempts.
    Turn off "Simple Passcode" in the same place and use something other than a 4 digit pin as your passcode.
    Also make sure Find my iPhone is enabled so you can locate and if necessary, forcibly wipe the phone.

  • How can i produce xml like this ?

    <mms>
    <subject>message subject</subject>
    <url_image>http://image_url</url_image>
    <url_sound>http://sound_url</url_sound>
    <url_video>http://video_url</url_video>
    <text>message text</text>
    <msisdn_sender>6281XYYYYYY</msisdn_sender>
    <msisdn_receipient>6281XYYYYYY</msisdn_receipient>
    <sid>to be define later</sid>
    <trx_id>Unique number</trx_id>
    <trx_date>yyyyMMddHHmmss</trx_date>
    <contentid>see note</contentid>
    </mms>
    How can i produce that xml?
    Can i produce it with this?
    public Element getXML(Document document) {
            // create sentContent Element
            Element sentContent = document.createElement( "mms" );
            // create subject Element
            Element temp = document.createElement( "subject" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getJudulFilm() ) ) );
            sentContent.appendChild( temp );
            // create url_image Element
            temp = document.createElement( "url_image" );
            temp.appendChild( document.createTextNode("") );
            sentContent.appendChild( temp );
            // create url_sound Element
            temp = document.createElement( "url_sound" );
            temp.appendChild( document.createTextNode("") );
            sentContent.appendChild( temp );
            // create url_video Element
            temp = document.createElement( "url_video" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getUrl_video() ) ) );
            sentContent.appendChild( temp );
            // create text Element
            temp = document.createElement( "text" );
            temp.appendChild( document.createTextNode("") );
            sentContent.appendChild( temp );
            // create msisdn_sender Element
            temp = document.createElement( "msisdn_sender" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getMsisdn() ) ) );
            sentContent.appendChild( temp );
            // create msisdn_recipient Element
            temp = document.createElement( "msisdn_recipient" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getMsisdn() ) ) );
            sentContent.appendChild( temp );
            // create sid Element
            temp = document.createElement( "sid" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getSid() ) ) );
            sentContent.appendChild( temp );
            // create trx_id Element
            temp = document.createElement( "trx_id" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getTrx_id() ) ) );
            sentContent.appendChild( temp );
            // create trx_date Element
            temp = document.createElement( "trx_date" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getTrx_date() ) ) );
            sentContent.appendChild( temp );
            // create contentid Element
            temp = document.createElement( "contentid" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getContentid() ) ) );
            sentContent.appendChild( temp );
            return sentContent;
        }& how can i send it to the server using HTTP request post method?

    <mms>
    <subject>message subject</subject>
    <url_image>http://image_url</url_image>
    <url_sound>http://sound_url</url_sound>
    <url_video>http://video_url</url_video>
    <text>message text</text>
    <msisdn_sender>6281XYYYYYY</msisdn_sender>
    <msisdn_receipient>6281XYYYYYY</msisdn_receipient>
    <sid>to be define later</sid>
    <trx_id>Unique number</trx_id>
    <trx_date>yyyyMMddHHmmss</trx_date>
    <contentid>see note</contentid>
    </mms>
    How can i produce that xml?
    Can i produce it with this?
    public Element getXML(Document document) {
            // create sentContent Element
            Element sentContent = document.createElement( "mms" );
            // create subject Element
            Element temp = document.createElement( "subject" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getJudulFilm() ) ) );
            sentContent.appendChild( temp );
            // create url_image Element
            temp = document.createElement( "url_image" );
            temp.appendChild( document.createTextNode("") );
            sentContent.appendChild( temp );
            // create url_sound Element
            temp = document.createElement( "url_sound" );
            temp.appendChild( document.createTextNode("") );
            sentContent.appendChild( temp );
            // create url_video Element
            temp = document.createElement( "url_video" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getUrl_video() ) ) );
            sentContent.appendChild( temp );
            // create text Element
            temp = document.createElement( "text" );
            temp.appendChild( document.createTextNode("") );
            sentContent.appendChild( temp );
            // create msisdn_sender Element
            temp = document.createElement( "msisdn_sender" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getMsisdn() ) ) );
            sentContent.appendChild( temp );
            // create msisdn_recipient Element
            temp = document.createElement( "msisdn_recipient" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getMsisdn() ) ) );
            sentContent.appendChild( temp );
            // create sid Element
            temp = document.createElement( "sid" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getSid() ) ) );
            sentContent.appendChild( temp );
            // create trx_id Element
            temp = document.createElement( "trx_id" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getTrx_id() ) ) );
            sentContent.appendChild( temp );
            // create trx_date Element
            temp = document.createElement( "trx_date" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getTrx_date() ) ) );
            sentContent.appendChild( temp );
            // create contentid Element
            temp = document.createElement( "contentid" );
            temp.appendChild( document.createTextNode(
            String.valueOf( getContentid() ) ) );
            sentContent.appendChild( temp );
            return sentContent;
        }& how can i send it to the server using HTTP request post method?

  • How can I make navigation like this...?

    http://timeger.com/work/JoseCuervo/JoseCuervo_Facebook.php
    I want to the user to be able to navigate within my site, like the navigation on this site. (the numbers on the right side of the screen re-populate the area with different images.)
    Thanks so much!

    Use mouse rollover with two images, one with just the text and the other image, rollover, with the oval around the text. You can link the first image to the page you want. This demo page has some examples: Mouse Rollover. The first two examples are hyperlink to other pages.
    OT

  • How can i render table like this

    anybody knows how i can render table like below
    header | header | header|
    cmbbox | cmbbox | cmbbox| <-- for sorting purpose
    header | header | header|
    data[][]....(content)
    plz anyone urgent!!

    anybody knows how i can render table like below
    header | header | header|
    cmbbox | cmbbox | cmbbox| <-- for sorting purpose
    header | header | header|
    data[][]....(content)
    plz anyone urgent!!

  • How can I format paragraphs like this?

    I am a novice DW user and a novice at web design.  I have a formatting challenge as follows.  First my stylesheet and then the problem:
    Could you please help me?  I have this need well more than 1,000 places on my website.  The insets vary, i.e. sometimes the first Line is inset 80px and the second and following Lines 120px, etc.  Again, I don't understand much of this so please be explicit.  Thanks very much!

    Your insertion didn't come through.  Ca you post a link to your web site?  Or use the camera icon in the web forum to upload an image into your post showing how you want to format paragraphs.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • How can I join images like this

    I have downloaded many wallpaper images and they come in left.jpg and right.jpg packs (I use dual monitors) and I would like to join them together but it takes too long in Gimp, as the process is Image > Canvas size, resize, then paste and align and save. Is there a quick CLI way or something to do this ?? What would be the method? Much appreciated if possible, thanks.

    tesjo,
    Thank you so much!! I was fiddling with it and kept messing it up trying -append and -adjoin. That works perfect, thanks a lot

  • How can I format paragraphs like this? -with missing image i hope

    I am a novice DW user and a novice at web design.  I have a formatting challenge as follows.  First my stylesheet and then the problem:
    For a larger image go to my website at    www.schembs.com/Left_Margin_Problem.png
    Could you please help me?  I have this need well more than 1,000 places on my website.  The insets vary, e.g. sometimes the first Line is inset 80px and the second and following Lines 120px, or 120 and 160, etc.  Again, I don't understand much of this so please be explicit.  Thanks very much!
    jds

    Thanks.  But is there a difference between what you are proposing:
    .indent {
             padding left: 200px;
    And what I already have?
    .col_5 {
              padding-left: 200px;
              padding-right: 50px
    And if I put a <p><span......> I get a blank line between my Line 1 and Line 2.  The <p> causes the blank line.
    With just a <br /> (and no <p>)  and then the <span class="col_5" the "col_5" command just is acting on the next line as in Example B.  Actually class="col_5" is additive to the previous class="col_4" callout, and therefore the indenting is 160px plus 200px or 360px.  In my Example B I used "col_1" after the "col_4" and get an indent of 160px plus 40px or 200px.
    Please look at:
    http://www.schembs.com/Left_Margin_Problem.png
    Jim

  • How can I show somehting like this?

    [opt1] [opt2] [opt3] [opt4]
    | Main Panel |
    | |
    | Sub Panel |
    | |
    Where opt1, opt2,... are tabs. When user click on different tabs, only Sub Panel will change.
    Main Panel will always stays the same.
    I was thinking about let Main Panel on TOP of a JTabbedPanel, and that JTabbedPanel has blank upper side.
    Is this possible?

    Well, the easiest way to do this, is using a JTabbedPane with tab location set to bottom ... ;-)
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JTabbedPane.html#setTabPlacement(int)
    Another way to go about this would be to use a CardLayout for SubPanel and represent opt1 to opt4 by JButtons with an ActionListener or JComponents on which you register a MouseListener, then switch cards when the button or the component is clicked.

  • How can i use query in Print out

    I am going to insert some Item's properties to print out of good issue, I dont know how can I use query in this tools?

    Hi,
    Please go through the following documentation on the service market place under the landing pages for
    cross topics:
    https://sapneth1.wdf.sap.corp/~form/sapnet?_FRAME=CONTAINER&_HIER_KEY=701100035871000437965&_OBJECT=011000358700003137952006E&_SCENARIO=01100035870000000183&
    Regards,
    Abhinav Banerjee
    SAP Business One Forums Team.

  • How can i write code inside methods.

    Hi,
       I am new to wbdynpro. How can i write code in Webdynpro?
    I have created one layout in that two textboxes are there. After entering the details when i click on the button the datas should be saved into the database table. How can i write code in this.
    please help me.
    Shyja

    Hi,
    First in context create node for 2 input field. Then disign layout for input filds and do data binding. Then create button and assign ON action event to it. In action method use wizard to read the values from the node.
    DATA: Node type REF TO IF_WD_CONTEXT_NODE,
    elem_node1 TYPE REF TO if_wd_context_element,
    stru_node1 type ZEMP.
    Node = wd_Context->get_Child_Node( Name = `S_NODE2` ).
    get element via lead selection
    elem_node1 = node->get_element( ).
    get all declared attributes
    elem_node1->get_static_attributes(
    IMPORTING
    static_attributes = stru_node1 ).
    INSERT ZEMP FROM stru_node1.
    If helpful reward points.
    Regards,
    Karthick S

  • CAn we write a query like this

    CAn we write a query like this?
    If not how can this be changed?
    select col1,col2,col3.col4
    from table 1
    where col1,col2 in(select col1,col2 from table2)

    Or it may be identical:
    SQL> CREATE TABLE t1 (c INT NOT NULL);
    Table created.
    SQL> CREATE TABLE t2 (c INT NOT NULL);
    Table created.
    SQL> INSERT ALL
      2  INTO t1 VALUES (rn)       
      3  INTO t2 VALUES (rn)
      4  SELECT rownum AS rn FROM user_tables WHERE rownum <= 15;
    30 rows created.
    SQL> BEGIN                                       
      2  DBMS_STATS.GATHER_TABLE_STATS(user,'T1');
      3  DBMS_STATS.GATHER_TABLE_STATS(user,'T2');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SQL> SELECT * FROM t1
      2  WHERE  EXISTS
      3         ( SELECT 1 FROM t2 WHERE c = t1.c )
      4 
    SQL> @xplan
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |             |    15 |    90 |     5 |
    |*  1 |  HASH JOIN SEMI      |             |    15 |    90 |     5 |
    |   2 |   TABLE ACCESS FULL  | T1          |    15 |    45 |     2 |
    |   3 |   TABLE ACCESS FULL  | T2          |    15 |    45 |     2 |
    Predicate Information (identified by operation id):
       1 - access("T2"."C"="T1"."C")
    SQL> SELECT * FROM t1
      2  WHERE  c IN
      3         ( SELECT c FROM t2 )
      4 
    SQL> @xplan
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |             |    15 |    90 |     5 |
    |*  1 |  HASH JOIN SEMI      |             |    15 |    90 |     5 |
    |   2 |   TABLE ACCESS FULL  | T1          |    15 |    45 |     2 |
    |   3 |   TABLE ACCESS FULL  | T2          |    15 |    45 |     2 |
    Predicate Information (identified by operation id):
       1 - access("T1"."C"="T2"."C")

Maybe you are looking for

  • Error while invoking renderPDFForm with attachment

    hi, I'm using ES4 renderPDFForm service to render pdf along with attachment. This service works if I dont have PDF attachment but doesn't work PDF with attachments. I'm sending the PDF attachment like below.      Map attachments = new Map();      Map

  • Connect TC to external WiFi?

    Can I connect my Time Capsule wirelessly to my existing wireless network? This is using a non-apple router.

  • Time capsule and deleting old backups

    Hi after performing a recent backup to an external drive I don't have much space left on the disk. It says that time capsule will delete old backups. Does this mean that any movies backed up in these early back ups will be deleted as I no longer have

  • Error message - ICERegions.html invalid???

    I am currently working my way through the Adobe Dreamweaver CS4 "Classroom in a book" - I am in the middle of Chapter 7, I've saved my document and then opened it up again and suddenly i have an error message that says: "The following translators wer

  • How to configure active active Configuration

    hI  ,  i am looking for a active active solution design   with the below desing  . 2 cisco asa  in  Site 1    in active /Standby  mode  1  cisco asa  in Site 2  Both the sites are connected on the private line  . running all services from site 1 and