Retrieve data from oracle table, table name passed in runtime into JSP

Hello All,
I am new to JSP, i have a requirement,
I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page.
can any one help me in that
thanks

1) Learn SQL.
2) Learn Java.
3) Learn JDBC.
4) Learn DAO.
5) Learn HTTP.
6) Learn HTML.
7) Learn JSP/Servlet.
8) Learn JSTL.
9) Apply learned things and develop.
Whenever you stucks, please come back and post the specific coding/technical problem here.

Similar Messages

  • Retrieve data from a large table from ORACLE 10g

    I am working with a Microsoft Visual Studio Project that requires to retrieve data from a large table from Oracle 10g database and export the data into the hard drive.
    The problem here is that I am not able to connect to the database directly because of license issue but I can use a third party API to retrieve data from the database. This API has sufficient previllege/license permission on to the database to perform retrieval of data. So, I am not able to use DTS/SSIS or other tool to import data from the database directly connecting to it.
    Here my approach is...first retrieve the data using the API into a .net DataTable and then dump the records from it into the hard drive in a specific format (might be in Excel file/ another SQL server database).
    When I try to retrieve the data from a large table having over 13 lacs records (3-4 GB) in a data table using the visual studio project, I get an Out of memory exception.
    But is there any better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?
    Any help on this problem will be highly appriciated.
    Thanks in advance...
    -Jahedur Rahman
    Edited by: Jahedur on May 16, 2010 11:42 PM

    Girish...Thanks for your reply...But I am sorry for the confusions. Let me explain that...
    1."export the data into another media into the hard drive."
    What does it mean by this line i.e. another media into hard drive???
    ANS: Sorry...I just want to write the data in a file or in a table in SQL server database.
    2."I am not able to connect to the database directly because of license issue"
    huh?? I never heard this question that a user is not able to connect the db because of license. What error / message you are getting?
    ANS: My company uses a 3rd party application that uses ORACLE 10g. And my compnay is licensed to use the 3rd party application (APP+Database is a package) and did not purchased ORACLE license to use directly. So I will not connect to the database directly.
    3.I am not sure which API is you are talking about, but i am running an application of the visual studio data grid or similar kind of controls; in which i can select (select query) as many rows as i needed; no issue.
    ANS: This API is provided by the 3rd party application vendor. I can pass a query to it and it returns a datatable.
    4."better way to retrieve the records chunk by chunk and do the export without loosing the state of the data in the table?"
    ANS: As I get a system error (out of memory) when I select all rows in a datatable at a time, I wanted to retrieve the data in multiple phases.
    E.g: 1 to 20,000 records in 1st phase
    20,001 to 40,000 records in 2nd phase
    40,001 to ...... records in 3nd phase
    and so on...
    Please let me know if this does not clarify your confusions... :)
    Thanks...
    -Jahedur Rahman
    Edited by: user13114507 on May 12, 2010 11:28 PM

  • Unable to retrieve data from a nested table in Oracle 8i from JSP

    How do i retrieve data from a nested table in Oracle 8i from my JSP code?
    When i try to execute the query , a general error is thrown.
    Kindly advice as soon as possible.

    How do i retrieve data from a nested table in Oracle 8i from my JSP code?
    When i try to execute the query , a general error is thrown.
    Kindly advice as soon as possible.

  • Error while retrieving data from PL/SQL Table using SELECT st. (Urgent!!!)

    Hi Friends,
    I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
    CREATE or REPLACE PROCEDURE test_proc IS
    TYPE tP2 is TABLE of varchar2(10); --declared a collection
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    While executing the above procedure, I encountered foll. error:
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
    ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [0]
    Can anyone please help me, where the problem is??
    Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
    Thanks in advance.
    Best Regards,
    Jay Raval.

    Thanks Roger for the Update.
    It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
    Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
    I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
    Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
    If someone have any other idea on this, please do let me know.
    Thanks a lot for all help.
    Best Regards,
    Jay Raval.
    You have to define a database type...
    create type tP2 is table of varchar2(10)
    CREATE OR REPLACE PROCEDURE TEST_PROC
    IS
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    This will work.
    Roger

  • Crystal Report error trying to retrieve data from a user table

    Hi,
    I'm making crystal report application with VS 2005 and I need to retrieve data form a user table. I'm using Pull method, I configure the connection and parameters by code.
    I think that the problem could be the @ that is used to identify these tables. Please, if some body had this problem before and have a solution, please let me know asap.
    Thanks

    Hi Andrea,
    I had the same problem today. I upgraded from Crystal Version 8 to 11 and the problem was solved. Maybe it is too late for you, but I wanted to post the solution if anybody else has the same problem.
    Regards
    Guillermo

  • Import data from oracle database table into csv file

    Hi
    I have to import data from a table into a csv file. Could anyone suggest the best method to do it? My application is JSP as frontend and have put business logic in servlet.
    Thanks in advance.

    FastReader from wisdomforce will help you quickly export data into csv file. http://www.wisdomforce.com
    fastreader can be called and executed as an external process ( Runtime.exec(..) ) to extract data from Oracle tables into flat file

  • Confused How to push Data from Oracle DB Tables into Hyperion Planning?

    HI
    I m Newbie to ODI. My DataSource is Oracle 11g Database (HR Tables) and my Target is Hyperion Planning.
    I successful imported Oracle DB HR tables into ODI and Hyperion Planning Dimensions Like(Employee) but i dont understand in " ODI Interface" how i am going to do Mapping between Oracle tables and Planning application Dimension, am i doing wrong way?
    I am confused if i have to push Data from Oracle 10g HR Tables into Hyperion Planning am i following right approach ?
    Looking for your guideline...
    Regards
    Sher

    Hi John
    Well i have working knowledge in ODI, i did whole complete cycle and i did customization project for Oracle EBS to Data warehouse though ODI.
    What, I am NOT able to figure out How to LINK Hyperion Planning Outline to Oracle EBS HR Tables. cause in Hyperion Outline i m able to view Dimensions Not particular Column to map with EBS HR Table (column).
    Eample:
    In EBS HR we have Employee Number in Per_all_people_f but in Hyperion Planning Dimension is ONLY Employee.
    Your response highly appreciated.
    Chreeez
    Sher

  • Retrieve data from oracle table

    hi,
    i have uploaded a piece of xml format data in oracle and successfully uploaded but when trying to retrieve data it reterieve 0 records. Oracle version is given below:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    create table temp_loading_lob(
                                            xml_id varchar2(3),
                                            q_clob CLOB
    nologging
    create table temp_loading_xml
    nologging as
    select xml_id,xmltype( q_clob) q_xml
    from temp_loading_lob;
    XMl Data
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <Root xmlns="http://www.w3.org/2000/10/XMLSchema">
         <Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
              <Account AccountID="QF8AA000">
                   <AccountName>124 On Brunswick Bed &amp; Breakfast</AccountName>
                   <Addresses>
                        <Address AddressID="aQF8AA000YMY">
                             <Description>Physical</Description>
                             <Address1>124 Brunswick Drive</Address1>
                             <Address2>Brunswick Park - RD 4</Address2>
                             <Address3></Address3>
                             <Suburb></Suburb>
                             <City>Rotorua</City>
                             <Postcode></Postcode>
                        </Address>
                        <Address AddressID="aQF8AA000WXX">
                             <Description>Postal</Description>
                             <Address1>PO Box 7365</Address1>
                             <Address2></Address2>
                             <Address3></Address3>
                             <Suburb>Te Ngae</Suburb>
                             <City>Rotorua</City>
                             <Postcode>3042</Postcode>
                        </Address>
                   </Addresses>
    </Accounts>
    </Account>
    </Root>
    Query used to reterive data
    select po.*
    from temp_loading_xml p,
         XMLTable('/Accounts/Account'
                   PASSING p.q_xml
                   COLUMNS
                      AccountID varchar2(20) PATH '@AccountID'
                      ,AccountName varchar2(20) PATH 'AccountName'                 
                                  )poi am trying to catch my error but unable to fix it. Any help will ge greatly appretiated. How can i close my thread?
    Best Regards,
    Zaid

    >
    <Root xmlns="http://www.w3.org/2000/10/XMLSchema">
         <Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
              <Account AccountID="QF8AA000">
    </Accounts>
    </Account>
    </Root>
    >
    must be
    <Root xmlns="http://www.w3.org/2000/10/XMLSchema">
         <Accounts ApplicationVersion="7.2.1.6 (10-02-2012)" Database="Q" DateExported="20120813">
              <Account AccountID="QF8AA000">
    </Account>
    </Accounts>
    </Root>and add namespaces to xmltable
    32  select po.*
    33  from temp_loading_xml p,
    34       XMLTable(
    35       xmlnamespaces(default 'http://www.w3.org/2000/10/XMLSchema')
    36       ,'Root/Accounts/Account'
    37                 PASSING p.q_xml
    38                 COLUMNS
    39                    AccountID varchar2(20) PATH '@AccountID'
    40                    ,AccountName varchar2(20) PATH 'AccountName'
    41                                )po
    42  /
    ACCOUNTID            ACCOUNTNAME
    QF8AA000             124 On Brunswick Bed
    SQL>

  • Populating selectboxes in form by retrieving data from oracle table

    hi guys...im a student .......i was thinking if someone could help me out.
    i am woking on a project which is being built using JSP with EL.(jstl)
    My problem is.......i have 2 interdependent select boxes in my form,which are CATEGORY and SUB CATEGORY. I could populate the first select box dynamically by extracting the values from the database table CATEGORYDATATABLE as foll:
    <sql:query var="q1" sql="select distinct(type) from catgorydatatable"/>
    <select name=selectbox1>
    <c:forEach var="a" items="${q1.rows}">
    <option>${a.type}</option>
    </c:forEach>
    </select>
    but the problem poped up when i tried to populate the second select box which is the subcategory.
    ie for example
    **if i select category as STUDENT from the first select box the second one should get populated with a of all student names......
    **on selecting category as Employee in first select box i should get to see all employee names in second select box and these names are to be extracted from the table.
    i tried the following code but it isnt working:
    <sql:query var=q2 sql="select subtype from categorydatatable where type=${param.selectbox1}"/>
    <select name=selectbox2>
    <c:forEach var=b items="${q2.rows}"/>
    <option>${b.subtype}</option>
    </select>
    please do help me with this.....i'd be very thankful on recieving a sample code on this
    thank u....
    shireeesha

    >
    After installing the ODAC package, I can now see a list of new drivers., including:
    1) Oracle in OraClient11g_home1This one is the one you installed when you installed the Oracle client.
    2) Oracle in XEThis one was installed when you installed XE on the system.
    Which one should I chose? I would have expected a Oracle Client in XE. Is there another ODAC package for the Express edition? I could not find any.I'd use the first one, though I don't use XE so have no experience with it. They're probably the same or very similar clients in this case.
    When I get into the Oracle ODBC Driver Configuration, it asks me for:
    TNS Service Name
    However, the dropdown box appears empty. Could you provide me a pointer on how to continue with the TNS Service name?There is a bug with the 32 bit driver that makes the dropdown always empty. You can just type the name in.
    Of course, that means you need to know the name. XE may have set that up for you already. Go to where you installed XE and look for a tnsnames.ora file, typically in the \network\admin folder. If your local database is set up there, you can copy that file to the same place in the other Oracle client's installation folder (\network\admin), and then type in the TNS name (that's the name before all the stuff in brackets).
    If there isn't one already set up, you'll have to create it and for XE I honestly have no idea how to do that. My DBA does it for all our databases. :)

  • Retrieving data from a relational table and CLOB as a whole XML file

    I created the table lob_example and I have managed to insert XML document into it using XML SQL Utility. In this document I put contents of <DESCRIPTION> tag into CDATA section.
    LOB_EXAMPLE
    Name Null? Type
    ID NOT NULL NUMBER
    DESCRIPTION CLOB
    NAME VARCHAR2(40)
    But I could not retrieve this data properly. I can think of only one solution - to parse and build the whole XMLDocument. I found the suggestion of another solution to use Oracle8i views to do that in http://technet.oracle.com/tech/xml/infoocs/otnwp/about_oracle_xml_products.htm, but this text is not clear enough for me.
    I would like to quote the fragment from document mentioned above, which is ambiguous for me:
    "Combining XML Documents and Data Using Views
    Finally, if you have a combination of structured and unstructured XML data, but still want to view and operate on it as a whole, you can use Oracle8i views. Views enable you to construct an object on the "fly" by combining XML data stored in a variety of ways. So, you can store structured data (such as employee data, customer data, and so on) in one location within object -relational tables, and store related unstructured data (such as descriptions and comments) within a CLOB. When you need to retrieve the data as a whole, you simply construct the structure from the various pieces of data with the use of type constructors in the view's select statement. The XML SQL Utility then enables retrieving the constructed data from the view as a single XML document."
    The main question is - how to use type constructors in the view's select statement?

    Hello
    Sorry for asking the same question again, but any responses would be greatly appreciated.
    How to use type constructors in the view's select statement?
    I could not find any answers for this question on Technet. Maybe the other approaches are more efficient to combine the part of data from CLOB with data from other column types?
    Thank you

  • Retrieve data from the same table

    i have a table with following fields
    emp_no,name,salary,department,dept_prev,prev_emp_no.
    now i want retrieve emp_no,name,salary,department, from the data base for a perticular employeee number along with dept_prev
    but dept_prev is the prev_emp_no dept_prev
    now iam doing two query like this
    first query to retreive name,salary,department
    select name,salary,department from employee where emp_no = 10
    second to retrieve the dept_prev from the same table but this
    dept_prev must be based on prev_emp_no
    select dept_prev from employee where emp_no in(select prev_emp_no from employee where emp_no =10)
    can any one suggest to combine these two queries in a single sql statements, because all the fieldds are from the same table.
    Thanks

    Would this one solve it?
    SELECT emp.NAME, emp.salary, emp.department,
           prev_emp.dept_prev
      FROM employee emp,
           employee prev_emp
    WHERE emp.emp_no      = 10
       AND prev_emp.emp_no = emp.prev_emp_no;
    not tested
    C.

  • UCCX DB Get Step - Retrieving data from a Temp Table

    Hello All,
    I have a situaion where I am running a stored procedure from a DB Read step and this stored procedure creates a temporary table that holds the data from SQL. I need assistance in determining how to retrieve this data as the table is dropped once the SP has finished. I am sure there will be additional information requested for you to help me out, but I appeciate everyone's help in advance.
    Chris G

    Hi Chris,
    I am trying to achieve the same. Did you manage to figure this out?
    Thanks.

  • How to save, update and retrieve data from two diffrent table

    Hi,
    I can save and retrieve data into an user defined SBO form from one database table only. How can I save retrieve and update records from two or more different tables in a single screen?
    Regards,
    Sudeshna.

    Sudeshna,
    Are these tables external to SAP Business One and do not have a Business Object?  If there is a Business Object available such as if you were to enter an order, that order would use the Documents object which abstracts you, the programmer, from the underlying tables that need to be updated.  If you are handling multiple business objects you would need to wrap the transaction with the StartTransaction - EndTransaction methods.  This information is detailed in the SAP Business One SDK Help Center that comes with the SDK.
    HTH,
    Eddy

  • How to retrieve data from a DB table USING BPEL.

    hi ,
    suppose i have a table XXLOANS in DB so i want to retrive data from db table,so for that i created a DB connection on BPEL and then a DB adapter and then through a INVOKE process i attached with that adapter and then assinging two ASSIGN.
    but i am not getting the output.
    can any body help me regarding this.
    can any body guide me by STEP BY STEP procedure,i think i am doing some thing wrong in ASSIGN.
    Thanks,
    Prakash

    Hey hi..
    create a partner link with a db adapter..
    write a query what you want from the table.
    create a invoke process and just create one assign activity where you can assign the output of the invoke activity into any variable of your choice..and the required datas from the table may be fetched into the variable ..this is db read functionality..
    thanks

  • Best way to retrieve data from oracle?

    Hi,
    I have a few questions.
    1.)Can a rowtype or a table type returned from oracle database can be retrieved as a dataset or datareader?
    2.)Cursors generally slow down your db(Iam from microsoft sql server back ground). But we seem to be using ref cursors quite a lot here.The only way to return a result as far as i have seen in oracle is to use a ref cursor.Is there any other way?

    Hello,
    1.)Can a rowtype or a table type returned from oracle database can be retrieved as a dataset or datareader?
    I'm not sure how complex your "table types" are -- do you mean PL/SQL Associative Arrays (formerly knowns as "index-by" tables)?
    I believe that %rowtype is a PL/SQL'ism that does not work outside of PL/SQL.
    However, the 11g version of the provider introduced User Defined Types (UDTs) which may be helpful depending on your requirements, etc.
    2.)Cursors generally slow down your db(Iam from microsoft sql server back ground). But we seem to be using ref cursors quite a lot here.The only way to return a result as far as i have seen in oracle is to use a ref cursor.Is there any other way?
    Using a ref cursor is the way to return a result set from PL/SQL to a client. If you are not using PL/SQL then you would not use a ref cursor.
    The .NET Developer Center has good information:
    http://www.oracle.com/technology/tech/dotnet/index.html
    Regards,
    Mark

Maybe you are looking for

  • I downloaded the new itunes, and lost everything, how do I get it back?

    How can I get all my stuff back in Itunes? I'm very frustrated!

  • ITunes - how do I change the title of a song?

    When I copied some tracks from a CD onto iTunes, the name of the song did not appear correctly such that The Verve's 'The drugs don't work' was added as 'Nutbush city limits'. How can I change this? I have tried editing the file at source but it does

  • Link to download operating system

    Dear all, I did procedure to buy mountain lion 10.8.x for my Imac actually powered with Mac OS X 10.6.8. Everything has been done correctly, I received mail of confirmation that operating system was available in mac app store for the download, but th

  • How to revert UserID?

    I had a Lion powered MacBook Pro with several backups on my Airport Time Capsule. After acquiring a mid-2014 MBP with Mavericks, I was unable to migrate from the last backup to the new MBP during setup: I selected my ATC in Migration Manager, I could

  • How to retrieve pictures

    My iphone is still on (i can hear it charge when it gets plugged in, and it still vibrates when I turn the volume off), but the screen is black. I can't access anything on my phone, but I was hoping that since it still responds to the USB port, that