Creating tables using jsp

hi
I have a mysql database and table which contains subjects(1-10). so I want to create a table, rows are fixed to 10 and columns based on number of subjects. the field on the database can have null value meaning if record1 has 3 subjects it must creat 3 columns, if record2 has 10 subjects it must create 10 columns. the first column is fixed from column two it must display the subject name from the database if the field is null the subject must not be displayed
help please. I would appreciate it
thanks

create always 10 columns, set table with insisible border, border=0,
and on every line fill in ony what you have.
if the subject is null print space char entity:  

Similar Messages

  • Logical error in creating tables using db link in solaris

    Hi,
    While creating table using the syntax create table newtab...as select * from tab@dblink .. I am facing a problem. The newtab table created is having a structure different (from datalength point of view of varchar2 and char datatypes) from the source. The data length is getting tripled i.e. if a column a is varchar2(20) in tab then it is becoming --- a varchar2(60) in newtab. This is happening in solaris environment when the two databases are in 2 different servers. Please let me know if there are any patches to resolve the problem.
    Thanks
    Arnab

    ORA-02019: connection description for remote database not foundHave you used this database link successfully for some other queries?
    The error posted seems to indicate that the DB Link is not functional at all. Has it worked for any other type of DML operation or is this the first time you ever tried to use the link?

  • Deleting a row from a table using jsp

    Given a table in a jsp, can an user click on a row of that table and retrieve the information so that the program can delete a record from a database table?
    most of the tables that I have seen are static, the user cannot interact with them(specially when the user wants to delete several records from a database table).
    Can anyone suggests a good book or way of deleting a row from table using jsp.

    eg use a column in the table that has a radio button or check box,
    on submit, get all the rows that are checked, using the row as an index into your db store, get the key and use the key to issue the sql delete command.

  • How do i Create charts using JSP/Servlet & Database

    I have to create charts which shows the graph of stock exchange.
    i have a database that keeps the data for creating charts.
    But i did not know how to create charts using jsp-servlet.
    Any Example might help me to go forward.
    Any help will be really appreciated.
    Please Advice me.

    JFreeChart - You can generate the charts then convert them to image formats (PNG and JPEG) all using the JFreeChart API
    http://www.jfree.org/jfreechart/

  • How to create table using Procedure

    Hi,
    I want to create table using procedure .
    How to write procedure for the table creation?
    thanks in advance.

    Use dynamic sql or DBMS_UTILITY.EXEC_DDL_STATEMENT:
    SQL> desc tbl1
    ERROR:
    ORA-04043: object tbl1 does not exist
    SQL> begin
      2      execute immediate 'create table tbl1(x number)';
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> desc tbl1
    Name                                      Null?    Type
    X                                                  NUMBER
    SQL> drop table tbl1
      2  /
    Table dropped.
    SQL> begin
      2      DBMS_UTILITY.EXEC_DDL_STATEMENT('create table tbl1(x number)');
      3  end;
      4  /
    PL/SQL procedure successfully completed.
    SQL> desc tbl1
    Name                                      Null?    Type
    X                                                  NUMBER
    SQL>  SY.

  • Create Table using DBMS_SQL package and size not exceeding 64K

    I have a size contraint that my SQL size should not exceed 64K.
    Now I would appriciate if some one could tell me how to create a table using
    Dynamic sql along with usage of DBMS_SQL package.
    Brief Scenario: Users at my site are not given permission to create table.
    I need to write a procedure which the users could use to create a table .ALso my SQL size should not exceed 64K. Once this Procedure is created using DBMS_SQL package ,user should pass the table name to create a table.
    Thanks/

    "If a user doesn't have permission to create a table then how do you expect they will be able to do this"
    Well, it depends on what you want to do. I could write a stored proc that creates a table in my schema and give some other user execute privilege on it. They would then be able to create a able in my schema without any explicitly granted create table privilege.
    Similarly, assuming I have CREATE ANY TABLE granted directly to me, I could write a stroe proc that would create a table in another users schema. As long as they have quota on their default tablespace, they do not need CREATE TABLE privileges.
    SQL> CREATE USER a IDENTIFIED BY a
      2  DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
    User created.
    SQL> GRANT CREATE SESSION TO a;
    Grant succeeded.
    SQL> CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10));
    CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10))
    ERROR at line 1:
    ORA-01950: no privileges on tablespace 'USERS'So, give them quota on the tablespace and try again
    SQL> ALTER USER a QUOTA UNLIMITED ON users;
    User altered.
    SQL> CREATE TABLE a.t (id NUMBER, descr VARCHAR2(10));
    Table created.Now lets see if it really belongs to a:
    SQL> connect a/a
    Connected.
    SQL> SELECT table_name FROM user_tables;
    TABLE_NAME
    T
    SQL> INSERT INTO t VALUES (1, 'One');
    1 row created.Yes, it definitely belongs to a. Just to show that ther is nothing up my sleeve:
    SQL> create table t1 (id NUMBER, descr VARCHAR2(10));
    create table t1 (id NUMBER, descr VARCHAR2(10))
    ERROR at line 1:
    ORA-01031: insufficient privilegesI can almost, but not quite, see a rationale for the second case if you want to enforce some sort of naming or location standards but the whole thing seems odd to me.
    Users cannot create tables, so lets give them a procedure to create tables?
    John

  • Create table using a dynamic SQL returns error.

    DBMS_UTILITY.exec_ddl_statement (
    'create table test_table as select column_names from table_name@dblink
    where condition' )
    i am using the above statement in a pl/sql procedure.
    It throws an error saying
    "Exact fetch returns more than requested no. of rows"
    can any one help me on this please!!!
    Very Urgent
    Thanks in Advance.
    Bala.

    Works for me. But the more important question would be the need to have this run within PL/SQL? Why do you want to do that? what is the requirement? can you not do this one time at SQL*Plus prompt and be done with it?
    SQL> drop table emp ;
    Table dropped.
    SQL>
    SQL>
    SQL> exec dbms_utility.exec_ddl_statement('create table emp as select * from [email protected] where deptno = 10') ;
    PL/SQL procedure successfully completed.
    SQL> select count(*) from emp ;
      COUNT(*)
             3
    1 row selected.
    SQL> select count(*) from [email protected] ;
      COUNT(*)
            14
    1 row selected.
    SQL> select count(*) from [email protected] where deptno = 10 ;
      COUNT(*)
             3
    1 row selected.
    SQL>Message was edited by:
    Kamal Kishore

  • Creating table using joins in subquery

    can we create a table by using joins in subquery??
    like this
    create table emp as select * from employees e,departments d
    where d.department_id=e.department_id
    can we ??

    What happens when you try it?
    It worked for me. See below:
    drop table test_table;
    create table test_table as
    select e.employee_id, e.first_name || ' ' || e.last_name ename, e.email, e.salary, d.department_name
      from employees e
      join departments d
        on (e.department_id = d.department_id)
    where e.salary = 10000;
    select *
      from test_Table;
    EMPLOYEE_ID ENAME                                          EMAIL                       SALARY DEPARTMENT_NAME             
            150 Peter Tucker                                   PTUCKER                      10000 Sales                         
            156 Janette King                                   JKING                        10000 Sales                         
            169 Harrison Bloom                                 HBLOOM                       10000 Sales                         
            204 Hermann Baer                                   HBAER                        10000 Public Relations

  • How to create table using mysql in LabVIEW

    Hii
               I am using mysql database Toolkit for my project.  In that how to New create a table. Is there any possiblilites to create a table using query...can u send a sample prg ... and inform which toolkit Vi to use....  

    The SQL syntax for creating a table is:
    CREATE TABLE table_name
    column_name1 data_type,
    column_name2 data_type,
    column_name3 data_type,
    )The toolkit has a funciton called DB Tools Create Table. That would be the obvious function to use if you don't want to execute a SQL query to create the table. The tooklit comes with examples. Have you looked at them? There's one called Create Database Table that  would seem to be exactly what you are looking for.

  • Can't create table - using JDeveloper 11g (11.1.1.3.0)

    I am running a DDL to create a table:
    CREATE TABLE HORSE
    HORSE_NAME VARCHAR2(30) NOT NULL
    , PLACE VARCHAR2(20)
    , RACE_NAME VARCHAR2(30)
    , RACE_DATE DATE
    , CONSTRAINT HORSE_PK PRIMARY KEY
    HORSE_NAME
    ENABLE
    The message I get is:
    Error at Command Line:48 Column:13
    Error report:
    SQL Error: ORA-02264: name already used by an existing constraint
    02264. 00000 - "name already used by an existing constraint"
    *Cause:    The specified constraint name has to be unique.
    *Action:   Specify a unique constraint name for the constraint.
    This suggests to me that I should change the name to something else, like HORSE_ID. Whilst I don't agree that HORSE_NAME is used in another constraint I have changed the name but it doesn't make a scrap of difference.
    There is another parallel table called HORSES (plural) but but other examples ( eg PUNTER/PUNTERS) have been happily created.
    I would be grateful for any suggestions.
    Thanks,
    Jim

    The message is not specifically about the HORSE_NAME - it is more likely about the table name.
    You probably already have another database object called Horse (maybe not a table but it could be a view or a procedure).
    Try a different name for the table.

  • Creating XML using JSP

    Hi I want to create a xml using JSP For eg I want to create a report
              and I want to take all the data required for the report from the user
              and want to put all the information in a session and whenever a user
              wants to see the html output I should be able to parse the xml file
              and show it to user.
              I know it is doable but I am confused about storing the data in
              session and concerting that data into XML file any help would be
              great.
              Thanks,
              Preeti
              

    Sounds like you might want to look at XML data binding. Something like JAXB
              or Castor can create an object that can be turned into XML by merely calling
              a single method and probably streamed to Xalan or whatever to create HTML.
              However, don't quote me on this - I am having enough troubles with trying to
              get the compiled Objects to be as I wish. Basically, they both take your
              DTD with an extra file that defines the types to be used in the classes -
              i.e. instead of string int might be used - and which tags to turn into
              classes and general information such as this about the output of your
              classes. You then simply call Unmarshal (for both castor and JAXB) and it
              loads the file from the selected input stream into the created object, you
              edit the object, what ever - store it on the server... and call Marshal to
              get back the xml... as this is all using streams it could be passed to Xalan
              for processing i think...
              Hope I've helped, and answered your question a little!
              "Preeti Sikri" <[email protected]> wrote in message
              news:[email protected]...
              > Hi I want to create a xml using JSP For eg I want to create a report
              > and I want to take all the data required for the report from the user
              > and want to put all the information in a session and whenever a user
              > wants to see the html output I should be able to parse the xml file
              > and show it to user.
              >
              > I know it is doable but I am confused about storing the data in
              > session and concerting that data into XML file any help would be
              > great.
              >
              > Thanks,
              > Preeti
              

  • How to create table with jsp in mysql

    Hi, every one,
    I just want to know how to create a table with jsp in mysql, please.
    Thanks in advance

    I have got the same question. I tried to pass sql "Create table" statement, but the servlet engine (tomcat4) threw an error "could not manipulet statement.execute". It works for normal SQL select statement.
    Anyone got the same problem ? or got a solution for this ? someone told me that PHP can do it, but just want to get it works with JSP.

  • Trying to create table using Union All Clause with multiple Select stmts

    The purpose of the query is to get the Substring from the value for eg.
    if the value is *2 ASA* then it should come as ASA
    where as if the value is *1.5 TST* the it sholud come as TST like wise for others too.
    I am trying to execute the below written SQL stmt but getting error as:
    *"ORA-00998 must name this expression with the column alias 00998.00000 - Must name this expression with the column alias"*
    CREATE TABLE TEST_CARE AS
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =5
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =14
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3),LEN FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7 AND old_care_lvl ='Regular'
    I want to create the table using the above given multiple select using the Union ALL clause but when trying to create run the query getting error as "ORA-00998 must name this expression with the column alias 00998.00000 - Must name this expression with the column alias"
    Please guide me how to approach to resolve this problem.
    Thanks in advance.

    When you create a table using a SELECT statement the column names are derived from the SELECT list.
    Your problem is that one of your columns is an expression that does not work as a column name SUBSTR(old_care_lvl,3)What you need to do is alias this expression and the CREATE will pick up the alias as the column name, like this:
    CREATE TABLE TEST_CARE AS
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3) column3, len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =5
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3), len FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =14
    UNION ALL
    SELECT row_id, old_care_lvl,SUBSTR(old_care_lvl,3),LEN FROM test_care_lvl
    WHERE LENGTH(old_care_lvl) =7 AND old_care_lvl ='Regular'
    );You may not like the name "column3" so use something appropriate.

  • Create Tables using sql.

    Hi Dear;
    can i create tables from SQL enterprise manager and not from SAP-BO without having problem in the upgrade?
    thank you Dear.

    Hi Adele,
    I never heard that there is any issue with additional / custom tables in a B1 <b>company</b> database.
    For certification there is no issue with that - except that you must use your SAP namespace also for these tables.
    For your reference I add here the current links to the page about Solution Certification (B1-SDK) + the Test Plan - which lists all requirements:
    B1-SDK: SAP BUSINESS ONE ADD-ON SOLUTION CERTIFICATION  (B1-SDK) [original link is broken]
    Test Plan: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/81a22ee1-0701-0010-45aa-ec852e882de3
    Regards,
    Frank
    Message was edited by: Frank Moebius
    PS: Adding tables to SBO-Common is a different game though since it is not expected that a partner adds tables there and <u>eventually</u> additional tables there might get removed during upgrades.
    If you have a need for additional data storage across all companies, please create a dedicated database for that purpose.

  • Error when trying to create tables using "asant create-db_common"

    Hi,
    I'm attempting to run asant create-db_common to use a .sql file to create a table in Pointbase. However I keep getting this error:
    Buildfile: build.xml
    init:
    create-db_common:
         [java] java.lang.NoClassDefFoundError: com/pointbase/tools/toolsCommander
         [java] Exception in thread "main"
    BUILD SUCCESSFUL
    Total time: 1 secondWhich means I need to include the classpath, I presume! But I don't know what file to add it to or where to begin.
    Can anyone help?
    Thanks.

    Still haven't solved this problem.
    Can anyone guide me at all?
    Many thanks.

Maybe you are looking for

  • Pasted lightboxes do not show when uploaded but do on browser preview

    I created the lightbox display on the first page and then as i worked from page to page i would paste the original lightbox to the new page and replace the images and the captions but when i upload the site it doesn't show the lightboxes on the pages

  • Partner not getting picked

    Hi All, We have the below scenario which is not happening as expected. We have the Partner Function ZS and ZG which is assigned to the respective Account Groups. ZS is the sourse for ZG. We have done the config for the Partner Function in such a way

  • PowerBuilder won't reactivate License after update

    Current;y have PowerBuilder Classic 12.5.2 build 5006 installed on a Windows 7 64bit machine.  This was licensed and activated properly.  Went to run the install again to add a missing database driver.  After updating, when I ran Powerbuilder, it cam

  • Headstart Oracle Designer Download

    Hi All, Can someone give the download link for Headstart Oracle Designer , needed urgently. Thanks

  • SCSI-3 Persistent Reservation (PGR) on virtual server

    I have problem with storage virtualization. It looks, that on virtual server (hosted by Hyper-V) there isn't possibility to have a SCSI Persistent Reservation (PGR). Am I right? Thank you for any help.