Join Data From 3 Tables

I have 3 tables: Table1(Col1,Col2,Col3,Col4); Table2(Col1,Col2,Col3,Col4); Table3(Col1,Col2,Col3,Col4) and they all contain data. Now I want to have a Table4(Col1,Col2,Col3,Col4) and Table4 will contain all data of 3 tables: Table1, Table2, Table3.
Please help me to write a sql query to have the Table4.
Thanks,

You just need to create view as this
CREATE VIEW View1
AS
SELECT col1, Col2, Col3, Col4 FROM Table1
UNION ALL
SELECT col1, Col2, Col3, Col4 FROM Table2
UNION ALL
SELECT col1, Col2, Col3, Col4 FROM Table3
If you want only distinct combination use UNION
CREATE VIEW View1
AS
SELECT col1, Col2, Col3, Col4 FROM Table1
UNION
SELECT col1, Col2, Col3, Col4 FROM Table2
UNION
SELECT col1, Col2, Col3, Col4 FROM Table3
Another way is using full join syntax on dummy condition
create view view1
as
select coalesce(t1.col1,t2.col1,t3.col1) as col1,
coalesce(t1.col2,t2.col2,t3.col2) as col2,
coalesce(t1.col3,t2.col3,t3.col3) as col3,
coalesce(t1.col4,t2.col4,t3.col4) as col4
from Table1 t1
full join Table2 t2
on 1=2
full join Table3 t3
on 1=2
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Select data from table not in another table

    Hi,
    I want to select data from table A which is not in table B.
    Currently I am doing:
    select
    snoA,
    nameA,
    dobA
    from A
    where snoA not in
    (select snoB from A, B
    where snoA = snoB
    and nameA = nameB)
    But above is very slow.
    Can I do something like:
    select
    snoA,
    nameA,
    dobA
    from A, B
    where
    EXCLUDE ( snoA = snoB and nameA = nameB)
    Please note that I need the where condition on both the columns.
    any help will be appreciated.
    -- Harvey

    What are the approximate data volumes in A and B?
    What is "very slow"?
    What version of Oracle?
    What is the query plan?
    Without knowing anything about your system, my first thought would be to see if a NOT EXISTS happened to be faster for your data
    SELECT snoA,
           nameA,
           dobA
      FROM a
    WHERE NOT EXISTS (
        SELECT 1
          FROM b
         WHERE a.snoA = b.snoB
           AND a.nameA = b.nameB )Of course, I'm not sure why you are joining A & B in your NOT IN subquery. It would seem like you would just need a correlated subquery, i.e.
    SELECT snoA,
           nameA,
           dobA
      FROM a
    WHERE snoA NOT IN (
        SELECT snoB
          FROM b
         WHERE a.snoA = b.snoB
           AND a.nameA = b.nameB )That should be more efficient than the original query. The NOT EXISTS version may or may not be more efficient than the NOT IN depending on data volumes.
    Justin

  • Join data from 2 data sources

    Hi,
      I am trying to join data from 2 web services and present as a single table. I tried "union", "intersection"  and a few other operators but they didn't give any output. Appreciate any help in this regard.
    Thanks
    Kiran

    What version of Visual Composer are you using?

  • Open HUB ( SAP BW ) to SAP HANA through DB Connection data loading , Delete data from table option is not working Please help any one from this forum

    Issue:
    I have SAP BW system and SAP HANA System
    SAP BW to SAP HANA connecting through a DB Connection (named HANA)
    Whenever I created any Open Hub as Destination like DB Table with the help of DB Connection, table will be created at HANA Schema level ( L_F50800_D )
    Executed the Open Hub service without checking DELETING Data from table option
    Data loaded with 16 Records from BW to HANA same
    Second time again executed from BW to HANA now 32 records came ( it is going to append )
    Executed the Open Hub service with checking DELETING Data from table option
    Now am getting short Dump DBIF_RSQL_TABLE_KNOWN getting
    If checking in SAP BW system tio SAP BW system it is working fine ..
    will this option supports through DB Connection or not ?
    Please follow the attachemnet along with this discussion and help me to resolve how ?
    From
    Santhosh Kumar

    Hi Ramanjaneyulu ,
    First of all thanks for the reply ,
    Here the issue is At OH level ( Definition Level - DESTINATION TAB and FIELD DEFINITION )
    in that there is check box i have selected already that is what my issue even though selected also
    not performing the deletion from target level .
    SAP BW - to SAP HANA via DBC connection
    1. first time from BW suppose 16 records - Dtp Executed -loaded up to HANA - 16 same
    2. second time again executed from BW - now hana side appaended means 16+16 = 32
    3. so that i used to select the check box at OH level like Deleting data from table
    4. Now excuted the DTP it throws an Short Dump - DBIF_RSQL_TABLE_KNOWN
    Now please tell me how to resolve this ? will this option is applicable for HANA mean to say like , deleting data from table option ...
    Thanks
    Santhosh Kumar

  • How to delete a single data from table using control file

    I want delete a single row data from table using sql loder control file
    Edited by: 977940 on Dec 19, 2012 9:00 PM

    977940 wrote:
    I want delete a single row data from table using sql loder control file
    Edited by: 977940 on Dec 19, 2012 9:00 PMWhy?
    And how do you imagine this happening with sqlloader?
    The entire purpose of sqlloader is to load data (hence, the name sql*loader*) into a table from an external source. If you want to delete rows from a table, you use the sql DELETE statement.
    What is the business problem you are trying to solve?

  • Fetch data from table and generate attachment than mail it.

    Hello Experts,
    From couple of day I am searching on Google for a better database procedure that will help me to get data from tables and generate attachment and mail it but i fail.
    My Scenario is:
    I have a query that will fetch almost 5000 records from database tables. Each record has almost 75 characters
    select a.location_code,
                   a.item_code,
                   b.description item_desc,
                   to_char(a.manufact_date,'ddMonyy')mfg,
                   to_char((a.manufact_date + nvl(b.expiry_period,0)),'ddMonyy')expr,
                   to_char((a.manufact_date + nvl(b.qurantine_period,0)),'ddMonyy')qrtn,
                   round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) days_elapsed,
                   a.closing_balance_posted quantity
              from wms_stock_current_balance_v a, wms_item_setup_mast b
             where a.closing_balance > 0
               and a.item_code = b.item_code
               and a.loc_type in ('RACKING','PICKING','QUICKA','BUNDLED')
               and nvl(b.qurantine_period,0) > 0
               and round(nvl (b.qurantine_period, 0) - (sysdate - a.manufact_date)) <= 0
          order by a.item_code, a.location_code;
    Sample data of above query is
    LOCATION_CODE
    ITEM_CODE
    ITEM_DESC
    MFG
    Expiry
    Quarantine
    Days Elapse
    Quantity
    13DL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    14DL0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    134
    14DL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    160
    14DR2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    20
    14LL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    17ER2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    17GL2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    17SL0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    17-Feb-10
    28-Mar-14
    1-Jun-13
    -125
    64
    18QL0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    23-Feb-10
    3-Apr-14
    7-Jun-13
    -119
    160
    19AR5
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    17-Feb-10
    28-Mar-14
    1-Jun-13
    -125
    160
    19DL1
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    19JR0
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    17-Feb-10
    28-Mar-14
    1-Jun-13
    -125
    60
    19TL1
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    160
    20GR2
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    20-Feb-10
    31-Mar-14
    4-Jun-13
    -122
    40
    36FL3
    000000000000000F0487
    CLEAR COOL BLACK 05ML
    18-Feb-10
    29-Mar-14
    2-Jun-13
    -124
    65
    19UR0
    000000000000000F0591
    COMFORT WHITE 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    1
    12SL1
    000000000000000F0593
    COMFORT PINK 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    42
    12SR1
    000000000000000F0593
    COMFORT PINK 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    42
    14OR1
    000000000000000F0593
    COMFORT PINK 24ML*300
    28-Oct-09
    28-Oct-11
    1-May-11
    -887
    8
    36EL4
    000000000000000F0594
    CLEAR HF DECRASE 5M*360
    14-Feb-10
    14-Feb-11
    12-Oct-10
    -1088
    14
    13VL1
    000000000000000F0595
    CLEAR COM SFT CRE 5*360
    8-Feb-10
    8-Feb-11
    6-Oct-10
    -1094
    160
    14ER0
    000000000000000F0595
    CLEAR COM SFT CRE 5*360
    8-Feb-10
    8-Feb-11
    6-Oct-10
    -1094
    105
    Database Info
    Oracle 10g
    Version 10.2.0.1.0

    Look at the sample code for generating a CSV file that I've just posted in response to a similar question:
    Re: How to execute a proc and spool files in a database job
    And the use the search button in this forum to find sample code for sending a CLOB as a plain/text e-mail attachment using UTL_SMTP.

  • How to retrieve multiple data from table and represent it in jsp page

    Hi
    The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
      <html>  function addRow()
                i++;
                var newRow = document.all("tblGrid").insertRow();
                var oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                    oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";           
                oCell = newRow.insertCell();
                oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
               // oCell = newRow.insertCell();
               // oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
            }<html>  Then this data are send to the next Servlet for adding into two table.
    My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
    Rows added into jsp page.
    Here is an code for that logic.
    <html>
    ArrayList<String> mucode = new ArrayList<String>();
                                ArrayList<Integer> serials = new ArrayList<Integer>();
                                ArrayList<Integer> apxrate = new ArrayList<Integer>();
                                ArrayList<Integer> srname = new ArrayList<Integer>();
                                ArrayList<String> itcode = new ArrayList<String>();
                                ArrayList<String> itname = new ArrayList<String>();
                                ArrayList<Integer> iqnty = new ArrayList<Integer>();
                                ArrayList<String> iuom = new ArrayList<String>();
                                ArrayList<Integer> pqnty = new ArrayList<Integer>();
                                ArrayList<String> puom1 = new ArrayList<String>();
                               ArrayList<Integer> arate = new ArrayList<Integer>();
                                ArrayList<String> rdate = new ArrayList<String>();
                                ArrayList<String> bcs = new ArrayList<String>();
                                ArrayList<String> ccs = new ArrayList<String>();
                                ArrayList<String> remarkss = new ArrayList<String>();
                                //ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
                                //ArrayList<String> dors = new ArrayList<String>();
                                //ArrayList<String> remarks = new ArrayList<String>();
                     String entryn = request.getParameter("entryno");       
                        String rows = request.getParameter("rows");
                        out.println(rows);  
                        //String Entryno = request.getParameter("entryno");
                       // out.println(Entryno);
                      int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
                                if(!Entryno.equals("")){
                                        entryno = Integer.valueOf(Entryno);
                                if(!rows.equals("")){
                                        rowcount = Integer.valueOf(rows);
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                                out.println(serials.size());
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("srno"+i)!=null){
                                                srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
                                out.println(srname.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmcd"+i)!=null){
                                                itcode.add(request.getParameter("itmcd"+i).trim());
                                        } //out.println(itcode.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("itmnm"+i)!=null){
                                                itname.add(request.getParameter("itmnm"+i).trim());
                                        }//out.println(itname.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("indentqty"+i)!=null){
                                                iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("uom"+i)!=null){
                                                iuom.add(request.getParameter("uom"+i).trim());
                                        }//out.println(iuom.get(i));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("mcode"+i)!=null){
                                                mucode.add(request.getParameter("mcode"+i).trim());
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("packqty"+i).equals("")){
                                          pqnty.add(0);
                                        }else
                                            pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("pack"+i)!=null){
                                                puom1.add(request.getParameter("pack"+i).trim());
                                       }else
                                        puom1.add("");
                               for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i).equals("")){                                     
                                            arate.add(0);
                                        }else
                                        arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));   
                     /* for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("rate"+i)!=null){
                                                arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
                              for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dor"+i)!=null){
                                                try{
                                                        rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                                        }else
                                           { rdate.add("");}
                                   for(int i=1;i<=rowcount;i++){
                                 if(request.getParameter("bcc"+i)!=null){
                                                bcs.add(request.getParameter("bcc"+i).trim());
                                        }out.println(bcs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("ccc"+i)!=null){
                                                ccs.add(request.getParameter("ccc"+i).trim());
                                        }out.println(ccs.get(0));
                                for(int i=1;i<=rowcount;i++){
                                    out.println("remark2");
                                        if(request.getParameter("remark2"+i)!=null){
                                                remarkss.add(request.getParameter("remark2"+i).trim());
                                        }out.println(remarkss.get(0));
                        ArrayList<String> Idate = new ArrayList<String>();
                        for(int i=1;i<=rowcount;i++){
                                        if(request.getParameter("dateindent"+i)!=null){
                                                try{
                                                        Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
                                                }catch(ParseException p){p.printStackTrace();}
                    String Rdate = dashdate.format(new java.util.Date());
                     String tdate = dashdate.format(new java.util.Date());    
                     // String Indentdate = dashdate.format(new java.util.Date());
                   //  String ApprovedT1 = dashdate.format(new java.util.Date());
                   //  String ApprovedT2 = dashdate.format(new java.util.Date());
                       // String ApprovedT1=" ";
                        //String ApprovedT2="";*/
                    String ApprovedT1= dashdate.format(new java.util.Date());
                   out.println (ApprovedT1);
                      String ApprovedT2=dashdate.format(new java.util.Date());
                       out.println(ApprovedT2);
                    String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
                       out.println(Indentdate);
                        String Cocode ="BML001";  
                        out.println(Cocode);
                        String Deptcode = request.getParameter("dept1");
                        out.println(Deptcode);
                        String Empcode = request.getParameter("emp");
                        out.println(Empcode);
                        String Refno =request.getParameter("rtype"); 
                         out.println(Refno);
                        String Divcode = request.getParameter("todiv1");
                        out.println(Divcode);
                        String Usercode = "CIRIUS";    
                         String Whcode = request.getParameter("stor");
                        out.println(Whcode);
                        // String Itemgroupcode = request.getParameter("");
                         String Itemgroupcode ="120000";
                         out.println(Itemgroupcode);
                        String Supplytypecode = request.getParameter("stype");
                        out.println(Supplytypecode);
                        String Delcode = request.getParameter("deliverycode");
                        out.println(Delcode);
                        String Itemclass="WS";
                        out.println(Itemclass);
                        // String Itemclass = request.getParameter("iclass");
                       // out.println(Itemclass);
                        String unitcode = request.getParameter("uni");
                        out.println(unitcode);
                         String Todivcode = request.getParameter("todiv1");
                        out.println(Todivcode);
                        String Appxrate = request.getParameter("rate");
                        out.println(Appxrate);
                        String Srno = request.getParameter("srno");
                        out.println(Srno);                
                    /*    String Indqty = request.getParameter("indentqty");
                      out.println(Indqty);*/
                  String Itemcode = request.getParameter("itmcd");
                       out.println(Itemcode);
                       String Othersp = request.getParameter("remark1");
                        out.println(Othersp);
                        String Reqdt = request.getParameter("dor");
                        out.println(Reqdt);
                        String Munitcode = request.getParameter("mcode");
                        out.println(Munitcode);
                        String Packqty = request.getParameter("packqty");
                        out.println(Packqty);               
                        String Packuom = request.getParameter("pack");
                        out.println(Packuom);
                        String Remark2 = request.getParameter("remark2");
                        out.println(Remark2);
                        String BC = request.getParameter("bcc");
                        out.println(BC);
                        String CC = request.getParameter("ccc");
                        out.println(CC);
                        try{
                            st=connection.createStatement();
                            connection.setAutoCommit(false);
                            String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
                            out.println(sql);
                            st.addBatch(sql);
                            for(int i=0;i<serials.size();i++){
                                out.println("Inside the Statement");
                                String query3="test query for u";
                                out.println(query3);
                               String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
                               out.println(queryx);
                                st.addBatch(queryx);
                           int[] result=st.executeBatch();
                           connection.commit();
                           for(int k=0;k<result.length;k++)
                           out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
                        catch(BatchUpdateException bue)
                        out.println("error1;"+bue+"");
                        catch(SQLException sql)
                        out.println("error2;"+sql+"");
                        catch(Exception l)
                        out.println("error3;"+l+"");
    </html>
       Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
    I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
    I have able to show the data in Header portions of page in this ways
    here i am adding the part of code which shows the data from header part of table i.e from Header table
      <html>
    <h2 align="center"><b>Indent Preparation</b></h2>
        <div align="left">
            <table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
                <tr>
                    <td ><div align="left"><b>Indent No.</b></div></td>
                    <td ><label>
                            <input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
                    </label></td>
                    <td ><div align="center"><strong>Indent Date</strong></div></td>
                    <td ><label>
                            <div align="center">
                                <input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
                            </div>
                    </label></td>
                    <td> </td>
                    <td><div align="right"><strong>Entry No.</strong></div></td>
                     <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
            <td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
    <%}else{%>
                   <td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
                             <%}%>
                            <div align="right"></div>
                </tr>
                <tr>
                    <td><b>Division</b></td>
                    <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
    <td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
    <%}else{%>
                   <td><input type="text" name="div" id="div" /></td>
                   <td><input type="hidden" name="div1" id="div1" /> </td>
              <%}%>
                    <td> </td>
                    <td> </td>
                    <td><div align="right"><strong>Unit</strong></div></td>
                   <%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
    <td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
    <td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
    <%}else{%>
                   <td><input type="text" name="unit" id="unit" /></td>
                   <td><input type="hidden" name="uni" id="uni" /> </td>
              <%}%>
                </tr>
                <tr>
    </html>
      Any suggestion on any above works is highly appreciated.
    Thanks and regards
    harshal

    Too much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
    I will only answer the question in the thread's subject:
    How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
    To display, make use of JSTL's c:forEach.

  • Pulling data from table to a flat file

    hi all,
    Good day to all,
    Is there any script which i can use for pulling data from tables to a flat file and then import that data to other DB's. Usage of db link is restricted. The db version is 10.2.0.4.
    thanks,
    baskar.l

    Is there any script which i can use for pulling data from tables to a flat file and then import that data to other DB'sFlat file is adequate only from VARCHAR2, NUMBER, & DATA datatypes.
    Other datatypes present a challenge within text file.
    A more robust solution is to use export/import to move data between Oracle DBs.

  • Can I create a Stored Procedure That access data from tables of another servers?

    I'm developing a procedure and within it I'm trying to access another server and make a select into a table that belongs to this another server. When I compile this procedure I have this error message: " PLS-00904: insufficient privilege to access object BC.CADPAP", where BC.CADPAP is the problematic table.
    How can I use more than one connection into an Oracle Stored Procedure?
    How I can access tables of a server from a Stored Procedure since the moment I'm already connected with another server?
    Can I create a Stored Procedure That access data from tables of another servers?

    You need to have a Database Link between two servers. Then you could do execute that statement without any problem. Try to create a database link with the help of
    CREATE DATABASE LINK command. Refer Document for further details

  • How to populate data from table into datagrid in form

    hi there. may i know how to populate data from a table into a datagrid? i have created a datagrid in a form using OLE's microsoft datagrid. i'm having problem to populate data from table into the grid. can i know how to do that? thanks

    Not exactly. I want to enter input from form and the user can have all options to choose i.e. HIGH, MEDIUM or so on.
    Suppose, you have option to select HIGH, MEDIUM or LOW and you can see all these options together. You select LOW and when you save, it is saves in the table as a value. So when you view the table again, it will show LOW as active and HIGH and MEDIUM are null.

  • How to Insert data from Table A to Table B

    Hi,
    I have to insert data from Table A into Table B.
    Table A is having 100 records and table B is having 10000 records.
    Condition is if data in Table A is not in table B then I have to insert into Table B or else I have to skip that.
    Can anyone help me with sample code.
    Thanks in advance and points are awarded for usefull answers.
    Thanks,
    Kumar.

    Hello Kumar
    Assuming that tables A and B have the same structure you can use the same logic as change documents are prepared. Assuming both of your itabs are of structure struc_a. Then define the following type:
    TYPES: BEGIN OF ty_s_itab_di. 
    INCLUDE TYPE struc_a.
    TYPES: CHIND  TYPE bu_chind.
    TYPES: END OF ty_s_itab_di.
    TYPES: ty_t_itab_di  TYPE STANDARD TABLE OF ty_s_itab_di                     
    WITH DEFAULT KEY.
    DATA:    gt_itab_old  TYPE ty_t_itab_di,
    gt_itab_new TYPE ty_t_itab_di.
    Fill itabs gt_Itab_old with the corresponding data of itab1 and gt_itab_new with the corresponding data of itab2.
    Very important: sort you itabs either by all key fields or by all fields.
    Call function <b>CHANGEDOCUMENT_PREPARE_TABLES</b> with the following parameters:
    - CHECK_INDICATOR = ' '
    - TABLE_NEW = gt_Itab_new
    - TABLE_OLD = gt_itab_old
    The function module will remove identical lines from both itabs. New entries in gt_itab_New will have CHIND = 'I' and deleted entries in gt_itab_old will have CHIND = 'D'. Modified entries are indicated by CHIND = 'U'.
    Read the documentation of the function module and play around with it. You will see that this a quite easy yet powerful approach for comparing itabs.
    Regards
    Uwe

  • Read data from Table at XI during Mapping

    Hi experts
    How we can pick data from one database table during Mapping, the table is at XI system.
    when we are picking data from table at R/3, we are using RFC Function Module/ BPM, can we pick data from XI database table during mapping ?
    what will be the steps to pick it ?
    Please Help.
    Regards,
    Study SAP

    hi Study Sap
    You may use RFC lookup
    kindly follow these links for RFC lookup
    RFC Lookup.
    Look ups.
    /people/francesco.bersani/blog/2007/03/05/data-lookup-optimized
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Use this crazy piece for any RFC Mapping Lookups!
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    SAP XI Lookup API
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Lookup’s in XI made simpler
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    regards
    Sandeep Sharma
    PS if helpful kindly reward points

  • Function module to fetch data from table SETLEAVES

    Hi All,
    We have a requirement to fetch the data from table SETLEAVES based on the setclass,subclass and group. As the table holds hierarchical data, Please let me know a FM which fetches all the hierarchical data from the table SETLEAVES.
    Regards
    Shiva

    Try:
        exporting
          e_class                     = '0102'
          e_setid                     = setid
          e_kokrs                     = my_kokrs
          e_mandt                     = sy-mandt
          e_master_data               = 'XXX'
          e_structure                 = 'X  X0200'
          e_replace_class             = space
          e_replace_unit              = space
          e_suffix                    = space
          e_old_line_level            = 1  "l_ol_level
        tables
          t_nodes                     = it_ceg_nodes
          t_values                    = it_ceg_values
        changing
          c_info                      = c_info
          c_overwrite                 = c_overwrite
        exceptions
          no_controlling_area         = 1
          no_chart_of_account         = 2
          different_controlling_areas = 3
          different_chart_of_accounts = 4
          set_not_found               = 5
          illegal_field_replacement   = 6
          illegal_table_replacement   = 7
          fm_raise                    = 8
          convert_error               = 9
          no_overwrite_standard_hier  = 10
          no_bukrs_for_kokrs          = 11
          others                      = 12.
    Rob

  • Sample pgm for moving data from table control to internal table

    Hi Experts,
          I am newbi to ABAP. I don't have good material for Table control . Appreciate if you direct me to some good source of knowledge on Table control.
    The problem at hand : I am trying to move info/data from table control (in screen painter/ input and output mode ) to ITAB but couldn't . Sample pgm if possible.
    <b>Modify ITAB index TC-Current_Line .</b>
    The above statement is not inserting new lines to ITAB . Help me!
    Thanks for your time

    hi,
    do like this...
    <b>PROCESS AFTER INPUT.</b>
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
      LOOP AT itab_det.
        CHAIN.
         FIELD itab_det-comp_code.
          FIELD itab_det-bill_no.
          FIELD itab_det-bill_date.
          FIELD itab_det-vend_cust_code.
          FIELD itab_det-bill_amt.
          MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD itab_det-mark
          MODULE tab1_mark ON REQUEST.
      ENDLOOP.
    <b>MODULE tab1_modify INPUT.</b>
      APPEND itab_det.
    <b>ENDMODULE.                    "TAB1_MODIFY INPUT</b>

  • Time Out Dump while extracting data from table CKIS

    Dear Friends,
    I am getting TIme Out dump for the below code, while extracting data from table CKIS.
    Table CKIS doesn't have any Indexes. Please guide me to resolve this.
    Regards,
    Viji.
    form get_keko_ckis.
      SELECT kalnr kalka kadky tvers bwvar matnr werks kokrs
             FROM keko
             INTO TABLE i_keko1
             FOR ALL ENTRIES IN i_final_modify
                 WHERE matnr = i_final_modify-main_f
                   AND werks = p_werks
                   AND kokrs = p_kokrs
                   AND kadat = p_kadat
                   AND bidat = p_bidat
                   AND bwdat = p_bwdat.
      IF sy-subrc = 0.
        SORT i_keko1 BY kalnr kalka kadky tvers bwvar.
        SELECT kalnr kalka kadky tvers bwvar posnr typps kstar
               matnr menge gpreis
               FROM ckis
               INTO TABLE i_ckis_temp
               FOR ALL ENTRIES IN i_keko1
               WHERE kalnr = i_keko1-kalnr
                 AND kalka = i_keko1-kalka
                 AND kadky = i_keko1-kadky
                 AND tvers = i_keko1-tvers
                 AND bwvar = i_keko1-bwvar.
            IF sy-subrc = 0.
              SORT i_ckis_temp BY kalnr kalka kadky tvers bwvar.
              LOOP AT i_ckis_temp INTO wa_ckis_temp.
                wa_ckis-kalnr  = wa_ckis_temp-kalnr.
                wa_ckis-kadky  = wa_ckis_temp-kadky.
                wa_ckis-posnr  = wa_ckis_temp-posnr.
                wa_ckis-typps  = wa_ckis_temp-typps.
                wa_ckis-kstar  = wa_ckis_temp-kstar.
                wa_ckis-matnr1 = wa_ckis_temp-matnr1.
                wa_ckis-menge  = wa_ckis_temp-menge.
                wa_ckis-gpreis = wa_ckis_temp-gpreis.
              CLEAR wa_keko1.
              READ TABLE i_keko1 INTO wa_keko1
                                 WITH KEY kalnr = wa_ckis_temp-kalnr
                                          kalka = wa_ckis_temp-kalka
                                          kadky = wa_ckis_temp-kadky
                                          tvers = wa_ckis_temp-tvers
                                          bwvar = wa_ckis_temp-bwvar
                                          BINARY SEARCH.
                 IF sy-subrc = 0.
                    wa_ckis-matnr = wa_keko1-matnr.
                    wa_ckis-werks = wa_keko1-werks.
                 ENDIF.
                 APPEND wa_ckis TO i_ckis.
                 CLEAR: wa_ckis_temp, wa_ckis.
              ENDLOOP.
            ENDIF.
        REFRESH: i_keko1, i_ckis_temp.
      ENDIF.
    endform.                    " get_keko_ckis

    Hi Try minimising the conditions in where clause
         SELECT fields..... FROM CKIS
         WHERE KALNR = KEKO-KALNR AND
                      KADKY = KEKO-KADKY AND
                      TVERS = KEKO-TVERS AND
                      TYPPS = 'M'.
        after this, deleting unwanted records from internal table as per pending conditions...
    Regds,
    Anil

  • Problems with retrieving data from tables with 240 and more records

    Hi,
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.
    I installed Oracle 11.2.0 Client and I started to have problems with retrieving data from tables.
    First I used the same connection string, driver and so on (O10 Oracle 10g) then I tried ORA Oracle but with no luck. The result is like this:
    I'm able to connect to database. I'm able to retrieve data but from small tables (e.g. with 110 records it works perfectly using both O10 and ORA drivers). When I try to retrieve data from tables with like 240 and more records retrieval simply hangs (nothing happens at all - no error, no timeout). Application seems to hang forever.
    I'm using Powerbuilder to connect to Database (either PB10.5 using O10 driver or PB12 using ORA driver). I used DBTrace, so I see that query hangs on the first FETCH.
    So for the retrievals that hang I have something like:
    (3260008): BIND SELECT OUTPUT BUFFER (DataWindow):(DBI_SELBIND) (0.186 MS / 18978.709 MS)
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=1
    (3260008): ,len=160,type=DECIMAL,pbt=4,dbt=0,ct=0,prec=0,scale=0
    (3260008): EXECUTE:(DBI_DW_EXECUTE) (192.982 MS / 19171.691 MS)
    (3260008): FETCH NEXT:(DBI_FETCHNEXT)
    and this is the last line,
    while for retrievals that end, I have FETCH producing time, data in buffer and moving to the next Fetch until all data is retrieved
    On the side note, I have no problems with retrieving data either by SQL Developer or DbVisualizer.
    Problems started when I installed 11.2.0 Client. Even if I want to use 10.0.1 Client, the same problem occurs. So I guess something from 11.2.0 overrides 10.0.1 settings.
    I will appreciate any comments/hints/help.
    Thank you very much.

    pgoel wrote:
    I've been connecting to Oracle 11g Server (not sure exact version) using Oracle 10.1.0 Client and O10 Oracle 10g driver. Everything was ok.Earlier (before installing new stuff) did you ever try retrieving data from big tables (like 240 and more records), if yes, was it working?Yes, with Oracle 10g client (before installing 11g) I was able to retrieve any data, either it was 10k+ records or 100 records. Installing 11g client changed something that even using old 10g client (which I still have installed) fails to work. The same problem occur no matter I'm using 10g or 11g client now. Powerbuilder hangs on retrieving tables with more than like 240 records.
    Thanks.

Maybe you are looking for

  • User Level SOD Report - Batch

    Hi GRC Experts, Every day my company runs a User Level SOD analysis against every user in ERP or HRP.  Here is the criteria for ERP (there is a connector): System:  Our defined ERP connector Risk Level:  All Rule Set:  Global User is not DDIC User Ty

  • EDI to Flatfile Conversion

    Hi all! I am new in SAP XI. And i am researching on how will I convert EDI (SLSRPT) to a flatfile. Can everybody advise me on how will I handle this? I can convert EDI to XML using Seeburger Adapter, and from XML, I will convert it to Flatfile. The c

  • Lost attachment after downloading

    how can i recover an attachment that deleted itself on downloading

  • Security code - Asha 302

    How to know the security code for my phone Asha 302 Moderator's note: We have provided a subject-related title to help other forum users easily view and respond to this post.

  • HT203234 Can´t load my songs in Garageband with my ipad2

    Can´t load my songs in Garageband with my ipad2, i think garageband needs a important update. After i record all channel in my Song, garageband complettly crashed and i must restart Garageband after crash. Every Song i produced are not loadeable, ple