Html form for select * from table a

Hi all,
I m looking for report on header/footer part from one apex pages
which will display context from table a, like sql statement
select * from table a, written in html.
Is any examples in java script/html select from tables
(and same insert into table A (...) select * from table b)
thanks,
Gordan

Hello Gordan,
Do you want to show the whole report or just some data of it?
If it's for ex just the name and address you could create two items and have a process or computation to fill it with your select statement.
If it's the whole report, just create the report and put it in for ex. Region 1. In your page template you can specify that Region 1 needs to come into the footer.
Regards,
Dimitri
-- http://dgielis.blogspot.com/
-- http://apex-evangelists.com/
-- http://apexblogs.info/

Similar Messages

  • Problem in displaying data onto Form after selecting from table.

    Hi there,
    I keep hitting this error when I tried to display the data after the selection from table. Using backing beans w data control to do it
    Err: java.lang.ClassCastException: java.util.Collections$SingletonList cannot be cast to java.lang.Integer
    Table used ArrayList to retrieve out the wanted data. E.g uses A object
    To display: selected data to retrieve the selected row to display as a read-only form layout below the table. E.g. need to get A.getName() to match with B object B.getName() then uses the B object to retrieve out the data.
    Anyone know how to do it?

    Hi
    use the follwing code
    int rowcount = wdContext.node<Name>().size();
    while(rs.next())
    IPrivate<ViewName>.I<Name>Element tabnode =wdContext.node<Name>().get<Name>ElementAt(i);
    tabnode.nodeAuthoriseNode().invalidate();
    tabnode.nodeAuthoriseNode().addElement(0,authele);
    tabnode.nodeAuthoriseNode().setLeadSelection(0);
    wend
    Regards
    Dhinakar

  • Open sys_refcursor for select from table variable?

    Hi,
    I've got a challenge for you! :-)
    I've got a procedure that has a lot of logic to determine what data should be loaded into a table variable. Because of various application constraints, i can not create a global temporary table. Instead, i'd like to create a table variable and populate it with stuff as i go through the procedure.
    The end result of the procedure is that i must be able to pass the results back as a sys_refcursor. This is a requirement that is beyond my control as well.
    Is there a way to make this sort of procedure work?
    Create Or Replace Procedure Xtst
    Mu_Cur In Out Sys_Refcursor
    Is
    Type Xdmlrectype Is Record (Col1 Varchar2(66));
    Type Xdmltype Is Table Of Xdmlrectype;
    Rtn Xdmltype;
    Begin
    Select Internal_Id Bulk Collect Into Rtn From Zc_State;
    open mu_cur for select col1 from table(rtn);
    end;
    11/42 PLS-00642: local collection types not allowed in SQL statements
    11/36 PL/SQL: ORA-22905: cannot access rows from a non-nested table item
    11/19 PL/SQL: SQL Statement ignored
    Show Errors;

    Not anything i'd want to personally implement.
    But for educational purposes only of course....
    create table this_will_be_gross
       column1 number,
       column2 varchar2(30)
    insert into this_will_be_gross values (1, 'begin the ugliness');
    insert into this_will_be_gross values (2, 'end the ugliness');
    variable x refcursor;
    ME_XE?
    declare
       Rtn sys.ODCIVARCHAR2LIST;
    BEGIN
       SELECT
          column1 || '-' || column2 Bulk Collect
       INTO
          Rtn
       FROM
          this_will_be_gross;
       OPEN :x FOR
       SELECT 
          regexp_substr (column_value, '[^-]+', 1, 1) as column1,
          regexp_substr (column_value, '[^-]+', 1, 2) as column2      
       FROM TABLE(CAST(rtn AS sys.ODCIVARCHAR2LIST));
    end;
    17  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.09
    ME_XE?
    ME_XE?print :x
    COLUMN1                        COLUMN2
    1                              begin the ugliness
    2                              end the ugliness
    2 rows selected.
    Elapsed: 00:00:00.11In the above example i 'knew' that a hypen was a safe character to use to break up my data elements (as it would not be found anywhere in the data itself).
    I would strongly encourage you not to implement something like this. I realize it's tempting when you are working in strict environments where it can take a serious battle to get structures like temporary tables or SQL Types created, but that's really the proper approach to be taking.

  • Code for Links from table

    i have attached the code with table having a field of Empid.
    how to give a link from Empid field to generate Empname,Depname
    in a table format.
    <html>
    <head>
    <title>Masterreport.jsp</title>
    </head>
    <body>
    <%
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    }catch(ClassNotFoundException excep)
    System.out.println("exception caught"+excep.getMessage());
    java.sql.Connection con=java.sql.DriverManager.getConnection("jdbc:odbc:Visualcaccess");
    java.sql.Statement st=con.createStatement();
    java.sql.ResultSet rs=null;
    try
    String string="select Empno from Employe" ;
    rs=st.executeQuery(string);
    }catch(Exception e)
    out.write("Exception caught"+e.getMessage());
    %>
    <TABLE border="1" cellpadding="5">
         <TBODY>
              <TR>
                   <TH colspan="1"><U>Updated List ofEmployees</U></TH>
              </TR>
              <TR>
                   <TH>Emp Name</TH>
              </TR>
              <% while(rs.next()){ %>
              <TR>
                   <TD><%=rs.getInt(1)%></TD></A>
              </TR>
         <%}
    rs.close();
    st.close();
    con.close();
    %>
    </TBODY>
    </TABLE>
    </form>
    </body>
    </html>

    Example from jsp document. Modify this to suit your needs. hope this helps.
    <%
    while (RS.next()){
    id = RS.getInt("id");%>
    <a href="cp5.jsp?id=<%=id%>">voting</a>
    <%
    %>
    then
    int id = Integer.parseInt(request.getParameter("id"));
    String empname = "";
    String depname = "";
    SELECT * FROM TABLE WHERE id=id;
    <%
    if (RS.next()){
    empname = RS.getString("empname");
    depname = RS.getString("depname");
    %>
    <tr>
    <td>
    <%=empname%><%=depname%>
    </td>
    </tr>
    <%
    %>

  • How do I do SELECT * FROM TABLE WHERE KEY IN ({list})?

    The title says it all really.
    Is there a reasonable performant way to perform the query
    SELECT * FROM TABLE WHERE KEY IN ({list})where {list} is String []?
    I am currently creating a PreparedStatement with a for loop like this   StringBuffer sb = new StringBuffer ("SELECT * FROM TABLE WHERE ID IN (");
      for (int ii=0;ii<keys.length;ii++) {
        sb.append (keys [ii]);
        if (ii != keys.length-1) sb.append (",");
      sb.append (")");but this means that the prepared statement is created each time I call my method and so I'm not sure that the optimizer will find it easy to cope with. Is there a construction that I'm missing along the lines of SELECT * FROM TABLE WHERE KEY = ? where I can create the PreparedStatement once and just call setObject or something on it when the values in {list} change?

    but this means that the prepared statement is created
    each time I call my method and so I'm not sure that
    the optimizer will find it easy to cope with.You are right, the optimizer won't find that easy to deal with (presuming that is even relevant for your driver/database.) But most optimizers won't do anything with statements that change and that is what you are doing.
    You could create several prepared statements which have a common number of bind variables. For example 10 statements with from 1 to 10 bind values. This will work if most of the queries use those.

  • Select * from table not working with Oracle OBDC driver

    Hello,
    In our web development we have been using the MS ODBC for Oracle
    driver to connect to our Oracle db. We decided to try the
    Oracle ODBC driver because it supports the commandTimeout
    property in ASP which the MS driver does not. The problem I'm
    running into now is that all of our select * from table
    statements appear not to be working. The Oracle ODBC driver
    version we are using is ver 8.00.05.00. Is there something that
    I'm not doing properly? If I take the same select * from table
    statement and name the columns, I dont get any error. Otherwise
    I'm getting a Subscript out of range error. It seems strange to
    me that this driver would not support a select * from table
    statement (which I''m told is the case by another developer
    here).
    Is there something I'm missing?
    Thanks,
    Pete

    I'm positive I have a connection. Otherwise I wouldn't get a
    response when I name the columns instead of using *.
    There must be something else that I'm missing or doing wrong.
    I've actually been looking into alternative ODBC drivers to see
    if I have the same problems but none that I have found support
    commandTimeout.
    Any other ideas?

  • Performace Which is better ?  : Bapi inside a loop OR Select from Tables

    Hi Gurus,
    I have a report which displays purchase info records.
    If I am selecting from tables i need to use EINA, EINE, EORD and some other tables.
    There is a BAPI which gets all purchase info records specific to a vendor , material , purchasing organisation.
    QUESTION: Performace wise which is the better Approach, either selecting from tables or BAPI for Purchase info records
    Regards
    Avi.

    Whether it using BAPI or select. you need to check the performance. If you have full key for these tables EINA, EINE, EORD  then mak a select outside of the loop and within loop use READ TABLE statement with binary search. of if you want multiple records within loop then use loop insdie loop.
    Your final objective is to minimise the database hits . If you use bapi inside loop then your database hits will be more
    select from EINA
    select from EINE
    select from EORD
    loop at itab,
      read table EINA
      read table EINE
      read table EORD
    endloop

  • Edit HTML FORM for Travel Request in BADI

    Hi Experts,
    I'm trying to use the BADI FITP_REQUEST_HTML_FORM_BADIDEF to edit the HTML form for travel request.
    I need to add and hide fields in tables, but I don't need to create new tables in the form.
    The example is like the following:
      CALL METHOD co_dd_document->add_table
        EXPORTING
          no_of_columns = 2
          width         = '350'
          border        = '0'
        IMPORTING
          table         = lo_estc_table.
    set estc columns
      CALL METHOD lo_estc_table->add_column
        EXPORTING
          width  = '150'
        IMPORTING
          column = lo_col1.
      MOVE text-t04 TO lv_text.
      CALL METHOD lo_col1->add_text
        EXPORTING
          text = lv_text.
    We don't need to create new tables, we need to add fields in an existing table of the form.
    Somebody knows how can I do that?
    I hope you can help me.
    Thanks in advance.
    Oscar.

    work around!

  • Special Grant to use "Select * from Table(cast..."??

    Hi,
    I've recently created the types and function to use the Table(Cast(funtion) as type)). It works fine, and gives me the correct result. I've granted execute on the types and on the function to a role that is enabled for a user, but when the user tries to use the "select * from table(cast(function) as type))", he gets a "ORA-01031: Insufficient Privileges" error message. Is there any other grant that must be given to the role, so that the user can execute the select?
    Thanks in advance!
    Daniel

    Hi Kamal,
    I'm not sure what anonymous PL/SQL block means. When I (or the user) try to run the select, I enter all the information, i.e., the owners for the type and function: "select * from table(cast(a.my_function(my_argument) as a.my_type))". I'm trying to use SQLPlus at this time, and I have Oracle 8i.
    I didn't to explicitly grant execute to the user because that would go against some rules I have to follow... I'll se if I give it a try though!
    Thanks!

  • Insert into table a (select * from table b) - need pk?

    Hi there.
    I'm going to insert into table FINAL (select * from table STAGING) - same structure but in STAGING the ID column has nulls.
    Do I need to provide the ID (primary key) for table FINAL or will it get created based on sequence/trigger?
    If I were doing this in a loop I'd get the next val from the sequence but on a simple insert, I'm curious.
    thanks!

    hmm.. what is ?
    it didn't like it.
    Error(11,4): PLS-00103: Encountered the symbol "[" when expecting one of the following:     begin case declare exit for goto if loop mod null pragma    raise return select update while with <an identifier>    <a double-quoted delimited-identifier> <a bind variable> <<    close current delete fetch lock insert open rollback    savepoint set sql execute commit forall merge    <a single-quoted SQL string> pipe
    9i, sqldeveloper                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to achieve that "SELECT * FROM table WHERE age BETWEEN 18 AND 23 AND n"

    How to achieve the SQL like that "SELECT * FROM table WHERE age BETWEEN 18 AND 23 AND name = 'Will' " with BDB C-API
    The primary key in the primary database is 'age' ,and the secondary key in the secondary index is 'name' ,in a lot of examples ,there are all simple , but how to do that complex one.thx~

    but this means that the prepared statement is created
    each time I call my method and so I'm not sure that
    the optimizer will find it easy to cope with.You are right, the optimizer won't find that easy to deal with (presuming that is even relevant for your driver/database.) But most optimizers won't do anything with statements that change and that is what you are doing.
    You could create several prepared statements which have a common number of bind variables. For example 10 statements with from 1 to 10 bind values. This will work if most of the queries use those.

  • Can I simulate SELECT * FROM TABLE WHERE ROW IN (1111,2222) using SQLJ

    I have a fct like
    public void fct(String inStr) {
    String str = "SELECT * FROM TABLE WHERE ROW IN" + inStr;
    // then I xecute the query using JDBC connection
    But I want to do the same thisn using SQLJ like:
    public void fct(String inStr) {
    #sql [nctx] iter = { SELECT * FROM TABLE WHERE ROW IN :inStr}
    When I run the second version and give a parameter like "(1111,2222)" it gives
    ORA-01722: invalid number error.
    Is there a way to give parameters to in clauses of SQLJ statements.
    Thanks in regard.

    This is a SQLJ FAQ. You can find the FAQ at:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html
    Your question is addressed in the following section:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#variablesizevaluelist
    Note that that section has a typo. The lines:
    ? // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),?};
    should read:
    ... // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),...};
    By the way, with the next release SQLJ will support pasting in of dynamic SQL fragments. Then you'll be able to do pretty much what you are trying to accomplish here (albeit with slightly different syntax). Until then you'd have to use the workarounds from the FAQ.

  • Select * from table where rownum 5; no rows returned? why is it so?

    select from table where rownum > 5;*
    no rows returned. why is it so?
    can anyone explain me?

    Hi,
    rownum is pseudo column, and it is based on the sort order.
    For ex, if you want to get the first 5 employees who get the least salary, you use,
    select ename,sal from
        (select ename, sal
         from emp
         order by sal )
        where rownum<=5
    ENAME      SAL                   
    SMITH      800                   
    ALLEN1     890                   
    JAMES      951                   
    TURNER     998                   
    ADAMS      1100Suppose, if you want to use highest salary, you change the order by and not the rownum. So, it becomes,
    select ename,sal from
        (select ename, sal
         from emp
         order by sal desc)
        where rownum<=5
    ENAME      SAL                   
    KING1      5000                  
    FORD       3000                  
    SCOTT      3000                  
    JONES      2975                  
    BLAKE      2850 So, its not the rownum you would want to change, but the order by.
    -Arun

  • Is select from view faster then select from table..???

    Hello Gurus,
    I want to query some data from two tables, both of table have many columns (attributes) and many rows...
    I use several where clauses to retrieve data from those tables..
    witch one is faster, I create a view or I just "select" from those tables???
    Regards.
    Nia...

    riedelme wrote:
    3360 wrote:
    riedelme wrote:
    Selecting through a view almost never helps performance and frequently hurts.Views do not affect performance.
    Views are simply queries and like queries there are fast and slow ones.I disagree.
    First of all, to use a view you are executing a query to get a result set, then accessing the data from that result set - a built-in extra step to perform to get data.First of all that entire explanation of how views work is not correct. The optimizer will rewrite the query to make the view go away if possible.
    SQL> create or replace view v as select * from dual;
    View created.
    SQL> explain plan for select * from dual where dummy = 'X';
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 272002086
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |     2 |     2   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("DUMMY"='X')
    13 rows selected.
    SQL> explain plan for select * from v where dummy = 'X';
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 272002086
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |     2 |     2   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("DUMMY"='X')
    13 rows selected.Exactly the same.
    >
    Second, when accessing the data from the view the result sets don't have indexes for fast lookups and efficient joins on later steps.This is also known as just making stuff up and is not how the database works. care to share any references at all for any of this?
    >
    Third, the systems I've seen that use views extensively - I am looking at one now - tend to perform joins on views using the same tables with the same data over and over. This is a design issue and not specifically a problem with views but they lend themselves to this misuse much too easilyCorrect as I said a view is just a query, and just like queries there are good fast views and bad slow views
    >
    I'll concede that the problem is not specifically with views themselves but as I just said they lend themselves to misuse. Tuning views of views and views joined to views is difficultYes, queries can be misused as can almost all SQL functions and functionality.
    As I said - Views are simply queries and like queries there are fast and slow ones.
    Nothing that you have posted that is accurate changes that.

  • Form for edit pair table

    Hi,
    my problem is how to create edit form for pair two tables for example COMPANIES and CAMPAIGNS.
    create table COMPANIES (
    id integer,
    name varchar2(100));
    create table CAMPAIGNS (
    id integer,
    name varchar2(100));
    create table PAIRS (
    id_company integer,
    id_campaign integer);
    And the problem is which wizard to edit user friendly (it is important) table PAIRS. My idea is to select certain campaign and then filter companies based on filter critera and then by unselecting checkbox be able to delete specified companies.
    Thanks
    sasa

    See the search results at
    http://forums.oracle.com/forums/search.jspa?objID=f137&q=tabular+form+%22intersection+table%22

Maybe you are looking for

  • How can I stream music via AirPlay but still have an internet connection?

    Hi guys, Ive just bought an Airplay speaker but I seem to be missing something here as I can't figure out how to stream my audio on my iPhone to the AirPlay speaker but still use the internet by either WiFi or 3G at the same time. I stream all my mus

  • Widgets in WebdynPro

    Hello , Is there any way to create widgets  in webdynpro which displays some info in that ? If so please help me in doing that. Thanks.

  • How to use a PID in a CRIO-9102 FPGA

    Hello My name is Francisco, and I'm a student of mechanical engineering in Portugal (FEUP).  I'm working on a project that involves the use of a CRIO-9102 to control a servo hydraulic cylinder. For this purpose I have to implement a PID controller in

  • Where is my url bar? Why is this such a P.I.T.A? Thanks.

    My url bar disappeared this morning and I have been trying to get it back for hours. Viewing and customizing my toolbar isn't working. I've tried the sychronized pressing control and + buttons to no avail. I can't believe that this process is so ridi

  • Insert coding error

    hi , anybody tell why error this coming.                            ''Comma without preceding colon (after INSERT ?)''.           INSERT INTO KNA1(KUNNR,ANRED,NAME1,PFACH,STRAS,PSTLZ,ORT01,                  TELF1,TELFX) VALUES(