Two rows as one display the data in one row

Hello All,
I would like to have data of two rows put in one as:
Lets say the data is like this:
SELECT * FROM TEST;
      COL1       COL2       COL3 C
       1.5          3          1 M
                    2          1 C
       2.5                     2 C
                  3.5          2 M
                  4.5          3 M How do i get the output as :
       COL1       COL2       COL3 COL4 COL5
       1.5          3          1 M      2
       2.5                     2 C      3.5
                  4.5          3 M If there are two rows with same value in Col3, then col5(a new dummy column in select stmt) the second row's col2 should be disaplyed in Row 1.
Can we do it in a Select Statement ?
Regds,
Amkotz

A try :
SQL> select * from Amkotz;
      COL1           COL2          COL3 C                                             
       1,5              3             1 M                                             
                        2             1 C                                             
       2,5                            2 C                                             
                      3,5             2 M                                             
                      4,5             3 M                                             
SQL> select a.col1,
  2         a.col2,
  3         a.col3,
  4         a.col4,
  5         max(decode(a.rowid,b.rowid,null,b.col2)) keep (dense_rank last order by a.col1,a.col2) as col5
  6  from   (select Amkotz.*, row_number() over (partition by col3 order by col1,col2) rn from Amkotz) a, Amkotz b
  7  where  a.rn=1
  8  and    a.col3=b.col3
  9  group by a.col1,
10         a.col2,
11         a.col3,
12         a.col4;
     COL1       COL2     COL3 C COL5      
      1,5          3        1 M 2         
      2,5                   2 C 3,5       
                 4,5        3 M            Nicolas.

Similar Messages

  • How I can display the values in one row when they come from the same colum

    This query
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints a,
    connman.cc_adm_prospect_master
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = prospect_pidm
    give me the results of
    ZA
    ZB
    ZC
    I want to use this query in a cursor to update a column in another table, the problem is that I need to update the table concatenating the values ZA,ZB,ZC
    I have 24 different codes stored in the column sorints_ints_code, so I don’t want to use 24 different cursors and I don’t to use cross reference, It is there any way that I DON’T know to display the data like this za,zb,zc without using cross reference, I don’t want to use the table 24 times…
    Like THIS, this is only for two values…
    SELECT
    a.sorints_ints_code,
    b. sorints_ints_code
    FROM
    saturn.sorints a,
    saturn.sorints b
    connman.cc_adm_prospect_master
    WHERE
    a.sorints_ints_code = ‘ZA’
    AND a.sorints_ints_code = ‘ZB’
    and a.sorints_pidm = prospect_pidm
    and b.sorints_pidm = prospect_pidm
    REMEMBER, I have 24 different values
    I am trying to write a procedure like this;
    Someone suggest this v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    BUT IT IS NOT WORKING!!!
    PROCEDURE prospect_coach_interest_upd
    p_prospect_term_code IN srbrecr.srbrecr_term_code%TYPE,
    p_prospect_admin_err_code OUT VARCHAR2,
    p_ora_err_code OUT NUMBER,
    p_ora_err_msg OUT VARCHAR2
    ) IS
    v_out_path VARCHAR2(40) := '/home/connman/student';
    v_out_file VARCHAR2(40) := 'cc_adm_prospect_'||p_prospect_term_code||'_'||TO_CHAR(SYSDATE,'YYYYMMDDHH');
    v_file_handle UTL_FILE.FILE_TYPE;
    v_pidm NUMBER;
    v_int_code1 varchar2(30);
    v_int_code2 varchar2(2);
    v_int_code3 varchar2(2);
    CURSOR cur_pidms IS
    SELECT prospect_pidm
    FROM connman.cc_adm_prospect_master
    WHERE prospect_term_code = p_prospect_term_code
    FOR UPDATE;
    CURSOR interest_coach_cur is
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = v_pidm ;
    interest_coach_rec interest_coach_cur%ROWTYPE;
    BEGIN
    UTL_FILE.FCLOSE_ALL;
    v_file_handle := UTL_FILE.FOPEN (v_out_path, v_out_file, 'a');
    UTL_FILE.PUT_LINE (v_file_handle,
    CHR (10) || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    UTL_FILE.PUT_LINE (v_file_handle, 'Entering the Admin Name procedure.');
    --- BEGIN
    FOR rec_pidms IN cur_pidms
    LOOP
    EXIT WHEN cur_pidms%NOTFOUND;
    v_pidm := rec_pidms.PROSPECT_pidm;
    v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    IF interest_coach_cur%ISOPEN
    THEN
    CLOSE interest_coach_cur;
    END IF;
    OPEN interest_coach_cur;
    FETCH interest_coach_cur
    INTO interest_coach_rec;
    IF interest_coach_cur%FOUND
    THEN
    UPDATE
    connman.cc_adm_prospect_master
    SET
    PROSPECT_COACH_INTEREST = interest_coach_rec.sorints_ints_code
    WHERE CURRENT OF cur_pidms;
    END IF;
    END LOOP;
    COMMIT;
    p_prospect_admin_err_code := '0';
    UTL_FILE.put_line (v_file_handle, 'Successful Completion.');
    EXCEPTION
    WHEN OTHERS
    THEN
    p_prospect_admin_err_code := '1';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    END; -- prospect_coach_interest_upd;

    Search in the forum or web you will find many solutions
    Return multi-row result as one comma-delimited row
    http://www.oracle-developer.net/display.php?id=412

  • Display array data in one row

    Hello ---
    I have an array of data, I would like to be displayed all the data in one row.<tr></tr>, how to do this?
    If I use <h:table> <column></column></h:table>, it will display different rows.
    Thanks!
    Ben

    Populate the components in the backingbean. Try something like:
    JSF<h:panelGrid binding="#{myBean.grid}" />MyBeanprivate List arrayOfData;
    private HtmlPanelGrid grid; // + getter + setter
    private void populateGrid() {
        grid = new HtmlPanelGrid();
        grid.setColumns(arrayOfData.size());
        for (Iterator iter = arrayOfData.iterator(); iter.hasNext();) {
            Object value = iter.next();
            HtmlOutputText text  = new HtmlOutputText();
            text.setValue(value);
            grid.getChildren.add(text);
    }

  • How to display the data in row wise in smartform

    Hi,
        I have to make a modification a smartform of poprinting and i want to display the row wise . At present it is displaying the  
        column wise. Actually there is a text which i want to display the data row wise.
        It is possible to display the data in row wise of the text .
    Edited by: nav009 on Oct 8, 2009 10:39 AM

    Hello ,
    I  assume that your requiremen is related to smartform.the below is the solution i suggest.
    As per my understanding of your requirement ,It's clear that as of now there is some description field which is also getting displayed along with other PO fields.
    However you would like to display the description field in a new line since the length of this field is longer than other fields as a result the data is getting scattered .
    Therefore one better option could be: since the whole data from PO would be in a loop you can display all other fields in one line type of the table as per the intial requirement and you display the description line alone in a new line type wth the desired length so that data would not be scattered and no data loss would happen.
    I assume you are aware of creating of line types for table.
    Thanks
    M.Naveen.

  • Problem in displaying the data of columns into rows in sap script

    hi,
    i am working on a sap script and i have to display the dat which is displayed in column into rows but it is not displaying it properly.
    eg, C
        12.1
        Si
        5.5
    it is displaying the data right now like this but i want to display the  data like this:-
    eg, C      Si
        12.1   5.5
    plzzprovide me guidelines how to solve this problem.

    hi,
    i am using this code to display the data:-
    plzz provide me guidelines where i am getting wrong?
    TOPparCOMPONENT DESP,,,,,, INS. LOT #, , , , , , MIC,,,,,,,,,, MIC VALUEparENDTOPparFINAL
    PROTECT
    IF &I_FINAL-PRUEFLOS& NE '000000000000'
    &I_FINAL-MAKTX(23)&&i_final-prueflos(12Z)&
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ELSE
    &I_FINAL-MAKTX(23)&     
    &I_FINAL-kurztext(25)&
    &I_FINAL-original_input(8)&
    ENDIF
    ENDPROTECT
    ITEMHEAD
    POSITION WINDOW
    SIZE WIDTH +0 . 4 CH HEIGHT +1 LN
    BOX FRAME 10 TW
    BOX HEIGHT '1.35' LN INTENSITY 20
    IF &PAGE& = '1'
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '43' LN FRAME '10' TW
    For horizontal line at top
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '43' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '43' LN FRAME '10'TW
    ELSE
    COLUMN LINES...
    END OF COLUMN LINES...
    BOX XPOS '0' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '75' CH HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '0' CM WIDTH '45' CM HEIGHT '0' LN FRAME '10' TW
    BOX XPOS '20' CH YPOS '0' CM WIDTH '0' CM HEIGHT '47' LN FRAME '10' TW
    BOX XPOS '0' CH YPOS '47' LN WIDTH '75' CH HEIGHT '0' LN FRAME '10'TW
    BOX XPOS '75' CH YPOS '0' LN WIDTH '0' CH HEIGHT '47' LN FRAME '10'TW
    ENDIF
    LINEFEED
    NEWPAGE
    NEW-PAGE
    provide me guidelines to solve this problem.
    Edited by: ricx .s on Mar 13, 2009 5:58 AM

  • Pie Chart Only Displays the Data of the First Row of the Table

    Hi Experts,
    I have a problem that the pie chart will not change when click on a second row or other rows on the table. It only displays the data of the first row of the table. How can I set up to make it reflect on any rows when I click the table? Please help, and I would very appreciate that.
    Thanks,
    -Don

    Thanks a lot for your response. I have realized that the pie chart behaves that way, so I just use the filter to see the specific data that I want. Also, you can drag the row and drop it right at the first row to see the data in the pie chart.

  • Report to display (actuals data from one cube and plan from another)

    Hi Gurus,
             I have a requirement in reporting to display actual data from one cube and plan data from a different one.
            The example below might give a clear picture of the requirement.
    rows has key figures and columns = months
    Jan |  Feb |  Mar |  Apr |  May |  Jun  ...   ....
    GrossSales
    Net Sales   
    Now if I run the report for Current month (Apr), then for the months of (Jan, Feb and Mar) i need to get the data from CUBE1   and for the remaining months (Apr thru Dec) from CUBE2.
    Similarly when i run the report next month(may), 
    then (data for Jan, Feb, Mar, Apr  from CUBE1)
    and ( May thru Dec from CUBE2)
    Any suggestions.
    Thanks in Advance
    Kumar

    Hi Henry,
         We alreadey have a multi provider which includes
    FinDat Cube(CUBE1) for actuals and Comm.Goals cube (CUBE2) for plan.
    So you suggest that we have two versions of key figure for actual and plan.
    ie. each KF will have two versions.
    actuals = (version 10, FiscPer<curr.mnth, key figure, acutals cube)
    Plan = (version 20, FiscPer>=curr.mnth, key figure, comm.goals cube)
    eg:
    Jan | Feb | Mar | Apr | May | Jun ...
    GrossSales(Act)
    GrossSlaes(Plan)
    Net Sales(Acutal)
    Net Sales(Plan)
    Correct me if I am wrong.
    the report has a lot of key figures, having two versions for each kf will be confusing.
    the user would like to see
    Jan.....| ...Feb  |..Mar |..Apr.....|  May  | 
    GrossSales   Act Value|Act.V |Act.V| PlanVal|PlanVal|
    Net Sales
    where Act.Value is from CUBE1
             Plan Value is from CUBE2
    Thanks
    Kumar

  • Displaying the data into the UI tables

    Hello Experts,
    I am new to web dynpro ABAP and I have created the tree with two UI tables(table1 and table2) by using web dynpro ABAP and want to display the data into both the UI tables at the same time just by one click on the item node of the tree.
    presently I am able to display the data as follows
    1. when I click on the item node the relevant data for the item  appears into table1, but not into table2
    2. when I  select the row of table1 then the revlevant data for item appears into table2.
    like this i can able to dispaly the data into both the table.
    My Question.
    how  to display the data at the same time into both the tables table1 and table2 just by one click
      on the item node.
    please help
    Thanks in advance
    Regards,
    fahad.

    Hi,
    I am able to invoke the method before the taskflow.
    But it is giving me the exception as *"UI Component is Null"* .
    The value of the table which I am using to display the data is coming as Null.
    Please let me know what could be the issue and how to solve this.

  • How to display the data in XML files into JSP using Jdeveloper.

    Hi All,
    I have two XML files one XML file has the view names and the other has the table names of a particular views, how to display the data in JSP using JDeveloper where when i click a particular view the list of tables of that particular view from XML file two should be displayed in JSP Page.
    Are there any reference documents, regarding the above process please can anyone guide through how to do it.

    Let the servlet ask your business tier to provide the data, then stuff it into beans, and pack those into the Session instance. Then forward the request to the JSP, let the JSP get those beans and display them.

  • How to display the data in PDF format

    hi all,
    i will give input in my selection screen and i will execute my report then it has to display data in PDF file in some directory (like c or d directory). i refered existingthreads . most of then saying using spool req we can download pdf file i.e. not my requirement. my requirement is when i click on execute button it has to display the data in pdf file with headings.
    Anybody can send me the sample code please.
    thanks,
    maheedhar

    Hi Easwar,
    i am sending my code. in this one records is splitting into 2 records.
    report zmaheedhar.
    maheedhar-start
    TABLES : vbak.
    parameters : p_vbeln type vbak-vbeln.
    data : begin of itab occurs 0,
            vbeln type vbak-vbeln,
            ERDAT type vbak-erdat,
            ERZET type vbak-erzet,
            ERNAM type vbak-ernam,
            ANGDT type vbak-angdt,
            BNDDT type vbak-bnddt,
            AUDAT type vbak-audat,
            VBTYP type vbak-vbtyp,
            TRVOG type vbak-trvog,
            AUART type vbak-auart,
            AUGRU type vbak-augru,
            GWLDT type vbak-gwldt,
            SUBMI type vbak-submi,
            LIFSK type vbak-lifsk,
            FAKSK type vbak-faksk,
            NETWR type vbak-netwr,
            WAERK type vbak-waerk,
            VKORG type vbak-vkorg,
           end of itab.
    maheedhar-end
    DATA: pripar TYPE pri_params,
          arcpar TYPE arc_params,
          lay TYPE pri_params-paart,
          lines TYPE pri_params-linct,
          rows TYPE pri_params-linsz.
    DATA: val(1), val1(1).
    *---> Local Printer Name defined in SAP, Change NHREMOTE to your local printer
    DATA: dest TYPE pri_params-pdest VALUE 'ZNUL'.
    DATA: name TYPE pri_params-plist VALUE 'Testing'.
    DATA: i_pdf TYPE STANDARD TABLE OF tline.
    DATA: spono TYPE tsp01-rqident.
    maheedhar-start
    top-of-page.
    write: 'Sales Document' , 'C Date', 'Entry time', 'Created By','Quotation date',
           'Date','Document Date','SD document category','Transaction group','Sales Document Type',
           'Order reason'.
    start-OF-SELECTION.
          select vbeln  ERDAT ERZET ERNAM ANGDT BNDDT AUDAT
                  VBTYP  TRVOG AUART AUGRU GWLDT SUBMI LIFSK
                  FAKSK  NETWR WAERK VKORG from vbak
            into table itab
            where vbeln = p_vbeln.
    maheedhar-end
    --- Retreive local printer details
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        destination            = dest
        no_dialog              = 'X'
        immediately            = ' '
      IMPORTING
        out_archive_parameters = arcpar
        out_parameters         = pripar
        valid                  = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    IF sy-subrc NE 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *-- Set Spool printer details w.r.t local printer
    pripar-prdsn = 'DSN'.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        in_archive_parameters    = arcpar
        in_parameters            = pripar
        no_dialog                = 'X'
        list_name                = name
      IMPORTING
        out_archive_parameters   = arcpar
        out_parameters           = pripar
        valid                    = val
        valid_for_spool_creation = val1
      EXCEPTIONS
        archive_info_not_found   = 1
        invalid_print_params     = 2
        invalid_archive_params   = 3
        OTHERS                   = 4.
    IF sy-subrc EQ 0.
    ---> Triggers the spool creation in the sense all the write statements from hereon will be written to spool instead of screen
      NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS pripar
      ARCHIVE PARAMETERS arcpar
      NO DIALOG.
    ELSE.
      WRITE:/ 'Unable to create spool'.
    ENDIF.
    *--- Output statements
    *WRITE:/ 'First Line', 'mahee','lklk','kikik','lokiuj','fffff','kijuyh','fgfgfgfg','gtgtgtgtgtgtgtgtggggggggggggggggggggggggggggggg'.
    *WRITE:/ 'Second Line'.
    LOOP at itab.
    write: itab-vbeln,
            itab-ERDAT,
            itab-ERZET,
            itab-ERNAM,
            itab-ANGDT,
            itab-BNDDT,
            itab-AUDAT,
            itab-VBTYP.
    ENDLOOP.
    "---> Close spool
    NEW-PAGE PRINT OFF.
    spono = sy-spono.
    Convert ABAP Spool to PDF
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
      EXPORTING
        src_spoolid                    = spono
        no_dialog                      = 'X'
    TABLES
       pdf                            = i_pdf
    EXCEPTIONS
       err_no_abap_spooljob           = 1
       err_no_spooljob                = 2
       err_no_permission              = 3
       err_conv_not_possible          = 4
       err_bad_destdevice             = 5
       user_cancelled                 = 6
       err_spoolerror                 = 7
       err_temseerror                 = 8
       err_btcjob_open_failed         = 9
       err_btcjob_submit_failed       = 10
       err_btcjob_close_failed        = 11
       OTHERS                         = 12.
    Download PDF contents to presentation server
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = 'c:\test.pdf'
        filetype                        = 'BIN'
      TABLES
        data_tab                        = i_pdf
    EXCEPTIONS
       file_write_error                = 1
       no_batch                        = 2
       gui_refuse_filetransfer         = 3
       invalid_type                    = 4
       no_authority                    = 5
       unknown_error                   = 6
       header_not_allowed              = 7
       separator_not_allowed           = 8
       filesize_not_allowed            = 9
       header_too_long                 = 10
       dp_error_create                 = 11
       dp_error_send                   = 12
       dp_error_write                  = 13
       unknown_dp_error                = 14
       access_denied                   = 15
       dp_out_of_memory                = 16
       disk_full                       = 17
       dp_timeout                      = 18
       file_not_found                  = 19
       dataprovider_exception          = 20
       control_flush_error             = 21
       OTHERS                          = 22.
    thanks,
    maheedhar

  • How to display the data?

    hi all,
    Im using Java NetBeans IDE 4.1 to create an application. I have connected my apllication to MS Access database by ODBC and then retrieved the data of a field named "student-name" by using method b]ResultSet() , this retrieve all of the name student and store into a single variable, after that, i used Whike() loop and .next() method to read the data stored in the variable and then display all of the data. but i face some problem in displaying the data....
    1) if i display the data using jLabel, then just the last record (eg,last name) will be displayed.
    2) if i display the data using jTextArea and its method ( void append() ), then the record can't be displayed separately row by row.
    Actually I would like to display the retrieved data in 2 way:
    A) display every record in the variable separately row by row by using a single component. And then allow the user to select any certain record.
    B) display all of the records in variable one by one from 1st record to last rocord by using jLabel. Once i click on a button, the 1st record will be showed on the jLabel, if i click again the button then the 2nd record will be showed.
    can anyone help me???
    Thanks,
    ning

    Thanks,
    I have read the information that provided by you. I have made a testing by using the coding provided in that web page. The following is a part of my coding, is it any mistake of that? The coding can be compiled but can't display any data in the list ( i place the code in a event of a button, can i do like that?).
    import java.sql.*;
    import javax.swing.*;
    public class testing2 extends javax.swing.JFrame {
    public testing2()
    initComponents();
    private void initComponents()
    jButton1 = new javax.swing.JButton();
    jList1 = new javax.swing.JList();
    getContentPane().setLayout(null);
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("jButton1");
    jButton1.addActionListener(new java.awt.event.ActionListener()
    public void actionPerformed(java.awt.event.ActionEvent evt)
    jButton1ActionPerformed(evt);
    getContentPane().add(jButton1);
    jButton1.setBounds(20, 20, 90, 23);
    getContentPane().add(jList1);
    jList1.setBounds(20, 70, 200, 200);
    pack();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // TODO add your handling code here:
    DefaultListModel listModel = new DefaultListModel();
    listModel.addElement("Alison Huml");
    listModel.addElement("Kathy Walrath");
    listModel.addElement("Lisa Friendly");
    listModel.addElement("Mary Campione");
    listModel.addElement("Sharon Zakhour");
    listModel.addElement("Alan Sommerer");
    JList List = new JList(listModel);
    public static void main(String args[])
    java.awt.EventQueue.invokeLater(new Runnable()
    public void run()
    new testing2().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JList jList1;
    // End of variables declaration
    Thanks,
    ning.

  • Display the dates in alphabets

    i want to display the date in alphabets,how to do that?
    means 9-mar-06 has to be display like" ninethmarch twothousand six"
    what is the query?

    SQL> select to_char(sysdate, 'ddspth Month Year') from dual ;
    TO_CHAR(SYSDATE,'DDSPTHMONTHYEAR')
    twenty-fourth February  Two Thousand Six
    1 row selected.
    SQL>

  • Strange scenario,Oracle can not display the data in mysql correctly

    I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
    -------mysql------------
    mysql> create table tst(id int,name varchar(10));
    Query OK, 0 rows affected (0.00 sec)
    mysql> insert into tst values(1,'a');
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from tst;
    ------------+
    | id | name |
    ------------+
    | 1 | a |
    ------------+
    1 row in set (0.00 sec)
    mysql> show create table tst\G
    *************************** 1. row ***************************
    Table: tst
    Create Table: CREATE TABLE `tst` (
    `id` int(11) DEFAULT NULL,
    `name` varchar(10) DEFAULT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    -------------oracle ------------------
    SQL> select count(*) from "tst"@mysql;
    COUNT(*)
    49
    SQL> select * from "tst"@mysql;
    id
    1
    SQL> desc "tst"@mysql;
    Name Null? Type
    id NUMBER(10)

    You can make the following query on the result page:
    "select * from the_table where movietitle = ? and cinema = ?"
    then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
    Below is the sample code, it assumes you have a connection to the database:
    PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
    stat.setString(1, usersMovieTitleSelection);
    stat.setString(2, usersCinemaSelection);
    ResultSet res = stat.executeQuery();
    if (res.next()) {
    out.print("The movie is available");
    } else {
    out.print("The movie is not available");
    }Now just add that to your JSP page. Enjoy ! =)

  • How can I display the data in table in separate column?

    I have a vi reading data one by one in the same column.
    How can I display the data with separate column?
    like this:
    data 1 | read | read
    data 2 | read | read
    data 3 | read | read
    (would you mind if I will ask for an example
    because it is much easier for me to work
    with an example)
    THANK YOU.

    If you're reading your data in as a 1D array, this is as simple as using the Reshape Array to make a 2D array. I've attached an example in LabVIEW 6.1 format. The example rearranges a single column of data fill several columns horizontally, but you can easily modify this code to fill the columns downward instead.
    Attachments:
    Data_Column_Example.vi ‏18 KB

  • How can we acess the data of one component into othr compnent in webdynpro?

    How can we acess the data of one component into other component in webdynpro....
    I need an Field input from one webdynpro component(comp1) which is away from the line of process to the other component(comp2) we need that data........I mean i need the field info of comp1 where we doesn't navigate through the Comp1 in the portal & directly access the component comp2.........kindly share your ideas.....and possible ways .........
    any doughts do post.....
    thanks in advance!

    Hi Reddy,
    You can do it in multiple ways. One way would be to try transfer the parameters through URL & the other would be to work with the concept of interface nodes. Please try go through these 2 threads ( [Thread 1|Call view of another WDA Component and pass the value to it; & [Thread 2|navigation from one program to another; )where I have explained about working with Interface node in detail. You can refer to this [thread |receving parameters between two standard webdynpro applications;to see as to how you can do the same via parameters in URL.  Hope it would help resolve your problem.
    Regards,
    Uday

Maybe you are looking for

  • Select a Vi to acquire, save and read continuous analog voltage

    Hi, i'd like to get a Vi to acquire a continuous voltage in a chart or graph to measure a load cell. I would like to save it in binary format (ASCII) or DIadem format and then to be able to display and use it in Diadem. I have already tried lots of v

  • How to dispay report with layout option in selection screen?

    Hi all, I have designed a report which also has a list box in the selection screen for the type of saved  layout that users have saved. I want the report to be displayed in the  layout that the user has entered. Eg:  if user chooses \RP from the list

  • Can't open web case until register product?

    This is my FOURTH time needing to have Adobe reset my account because it says I have "Too many activations".  Of course this is because every time I try to open the program I have to go through the activation setup process.  I have encountered a new

  • How do I resolve error message 1328?

    I cannot update Acrobat Pro XI, even after reinstatlling the software as suggested in the FAQ.  I am using windows 7 professional. 

  • WFMLRSVCApp.ear file missing

    Hi All, I am install Oracle RAC 11g . my CRS installation went fine. during RAC 11g binary installation , i am facing strange error. it is saying INFO: 8/2/09 11:14:02 PM PDT: Starting install Install Phase 1 of component Oracle 11g Warehouse Builder