Create table from DTD

Does anyone know of a simple way to generate a table (either a SQL build script or an actual table) from a DTD file? I have developers in my shop capturing XML documents and storing them in a CLOB field in a table. I want to be able to parse this CLOB out into other tables based on DTD's that are already built for web pages. Can this be done simply, easily, quickly - possibly with the XML Parser Kit?

A DTD has no information about datatypes, column lengths, or anything, other than element nesting information.
What kind of table would you be expecting from such a utility? A table with column names matching your nested element names, each with datatype VARCHAR2(4000)?
I'm curious to understand what type of output is expected from such meager information that the DTD provides on input.
With an XML Schema in hand, it's a totally different story. There, automatically storage creation will be a feature of an upcoming Oracle9i release.

Similar Messages

  • Create Oracle tables from DTD

    Hi,
    are there any tools to create oracle tables from dtd's

    None to my knowledge. DTD's don't provide any data type information or length information on the data, so at best such a tool could create you tons of VARCHAR2(4000) columns.

  • Getting error while creating table from one database to other.

    Hi,
    We are getting below error while creating the table from one database to other.
    SQL> create table fnd_lobs parallel compress as select * from [email protected];
    create table fnd_lobs parallel compress as select * from [email protected]
    ERROR at line 1:
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    ORA-02063: preceding line from EEXIT2TEST
    ORA-01555: snapshot too old: rollback segment number 28 with name "_SYSSMU28$"
    too small
    Regards,
    Bhatia

    hi
    what are the apps version local and remote database???
    Snapshot too old errors occur because Oracle can 't reconstruct a consistent
    image of a block for the purposes of a consistent read.
    I feel at remote database, you are using UNDO, it will be rather easy to iincrease the undo retention time or increase the undo tablespace size.. if you are dealing with roll back segments, you may have rollback segments whose optimal values are too small...
    increase roll back segments size and select again then
    the following metalink notes might be helpful
    ORA-01555 "Snapshot too old" - Detailed Explanation Doc ID: 40689.1
    How To Avoid ORA-01555: Snapshot Too Old When Running PAAPIMP Doc ID: 603259.1
    OERR: ORA 1555 "snapshot too old (rollback segment too small)" Doc ID: 18954.1

  • Create table from external data with dates

    I have a CSV that looks somewhat like this:
    abcuser,12345,5/12/2012,5,250.55
    xyzuser,67890,5/1/2012,1,50
    ghjuser,52523,1/1/1900,0,0
    When I create the external table, then query it I get a date error:
    CREATE TABLE xtern_ipay
    userid VARCHAR2(50),
    acctnbr NUMBER(20, 0),
    datelastused DATE,
    number_rtxns NUMBER(12, 0),
    amtused NUMBER(12, 0)
    organization external ( TYPE oracle_loader DEFAULT directory "XTERN_DATA_DIR"
    ACCESS parameters (
    records delimited BY newline fields terminated BY "," )
    location ('SubscriberStatistics.csv') ) reject limit UNLIMITED;
    Error I see in the reject log:
    Field Definitions for table XTERN_IPAY
    Record format DELIMITED BY NEWLINE
    Data in file has same endianness as the platform
    Rows with all null fields are accepted
    Fields in Data Source:
    USERID CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    ACCTNBR CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    DATELASTUSED CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    NUMBER_RTXNS CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    AMTUSED CHAR (255)
    Terminated by ","
    Trim whitespace same as SQL Loader
    error processing column DATELASTUSED in row 1 for datafile g:\externaltables\SubscriberStatistics.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    error processing column DATELASTUSED in row 2 for datafile g:\externaltables\SubscriberStatistics.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    error processing column DATELASTUSED in row 3 for datafile g:\externaltables\SubscriberStatistics.csv
    ORA-01858: a non-numeric character was found where a numeric was expected
    Any ideas on this? I know I need to tell oracle the format of the date on the external file, but I can't figure it out.

    Try this:
    CREATE TABLE xtern_ipay
       userid         VARCHAR2 (50)
    , acctnbr        NUMBER (20, 0)
    , datelastused   DATE
    , number_rtxns   NUMBER (12, 0)
    , amtused        NUMBER (12, 2)
    ORGANIZATION EXTERNAL
        ( TYPE oracle_loader DEFAULT DIRECTORY "XTERN_DATA_DIR"
    ACCESS PARAMETERS (
    RECORDS DELIMITED BY NEWLINE FIELDS TERMINATED BY "," MISSING FIELD VALUES ARE NULL
    (   userid
      , acctnbr
      , datelastused DATE 'mm/dd/yyyy'
      , number_rtxns
      , amtused)
    location ('SubscriberStatistics.csv') ) reject LIMIT unlimited;
    select * from xtern_ipay;
    USERID                                                ACCTNBR DATELASTU NUMBER_RTXNS    AMTUSED
    abcuser                                                 12345 12-MAY-12            5     250.55
    xyzuser                                                 67890 01-MAY-12            1         50
    ghjuser                                                 52523 01-JAN-00            0          0
    {code}
    Sorry I had to correct the previous statement again for the date format and for the column amtused that was defined without decimals.
    Regards
    Al
    Edited by: Alberto Faenza on May 31, 2012 6:34 PM
    wrong date format mm/dd/yy instead of dd/mm/yy
    Edited by: Alberto Faenza on May 31, 2012 6:40 PM
    Fixed again the date format and the amtused defined with 2 decimals                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • I can't create table from another table?

    Hi everyone!
    I have a problem that I don't known the reason why?
    I'm using Oracle version 8i and I want to create a table from another table, such as:
         CREATE TABLE a_backup as SELECT * FROM a => It's OK, table a_backup is created.
    But there is only a table that I can't created like that, such as:
         CREATE TABLE b_backup AS SELECT * FROM b;
    When I run over command, SQL Plus is not responding... and clients are can't access to DB or Executing forever
    This is the first time I met this problem.
    Can Anyone help me to resolved it?
    Thanks in advance!

    xi`tin wrote:
    Hi everyone!
    I have a problem that I don't known the reason why?
    I'm using Oracle version 8i and I want to create a table from another table, such as:You realize, of course, that 8i is completely out of support .... Is your OS and hardware just as old as your rdbms software, or is it only the rdbms that your company refuses to upgrade?
         CREATE TABLE a_backup as SELECT * FROM a => It's OK, table a_backup is created.
    But there is only a table that I can't created like that, such as:
         CREATE TABLE b_backup AS SELECT * FROM b;
    When I run over command, SQL Plus is not responding... and clients are can't access to DB or Executing forever
    This is the first time I met this problem.
    Can Anyone help me to resolved it?
    Thanks in advance!

  • Create table from query in Form

    I want to create table in Form 6i, on form I have :sdate , :edate and :dpt Item.
    PROCEDURE TableView IS
    BEGIN
    FORMS_DDL('drop table test');
    declare
    v_com varchar2(4000);
    BEGIN
    V_COM := 'Create table test as
           select * from emp
    where hiredate between :sdate and :edate
    and deptno = :dpt
    FORMS_DDL(V_COM);
    end;When I was tried in TOAD It is showing error
    ORA-01036: illegal variable name/number
    Edited by: Ahmed on Oct 19, 2011 11:11 PM

    you can't use bind variables within forms_ddl. An option would be to not do any ddl at all, and do something like this:
    delete from test;
    insert into test(a,b,c)
    select a,b,c from emp
    where hiredate between :sdate and :edate
    and deptno = :dpt;cheers

  • "Create Table from select Query" Vs "Insert into"

    Hi
    Schenaio:
    My Select Query returns more than 10 million records, these records needs to be inserted into another table.
    Approach 1:
    I created table called TABLE1, and inserted the records using INSERT statement as a batch (batch size is 5000).
    Approach 2:
    I create table like,
    CREATE TABLE TABLE1 AS <SELECT QUERY>
    Here Apporach-1 took almost 40 minutes to complete the insert but Approach-2 took only 6 minutes.
    If anybody knows why it is? And is there any way to improve the performance of Approach-1?.
    Thanks
    Nidhi

    Most "batch" methods execute the same query multiple times. Row filtering is done after the rows are fetched from the source. The process of fetching all the rows could be a FullTableScan.
    Therefore, a FullTableScan is executed for each batch of 5000 rows.
    However, your query and batch definitions may well be different. We haven't seen the query and the execution plan.
    Another point : How are you "filtering" the rows (i.e the second execution inserts rows 5001 to 10000 and does not attempt to reinsert rows 1 to 5000) ?
    What is the overhead imposed by the filter ? (does the third execution have to exclude rows 1 to 10000 and inserts rows 10001 to 15000 and so on)
    Hemant K Chitale

  • Create table from another db

    Basically, I need to create a table from a query that runs against another db on a separate box. Is this possible?
    Thanks

    If you're able to create a database link to the other server you could then use the query(modifying the tables in the from clause to use the dblink) in a create table statement.

  • Create table from another table including constraints

    Hi,
    Is there a way to create a table from another table including constraints.
    CREATE TABLE COPY_EMP
    as
    SELECT *
    FROM EMP
    WHERE 1 =2 ;
    This creates the table, but the constraints are not copied over.
    I was reading about DBMS_REDEFINITION - can that be used for this scenario ?
    Thanks!
    Anand

    >
    I tried that, but the constraint names are posing a problem. And unfortunately our constraints are not named in a standard, so am finding it difficult to replace them.
    Was just wondering if there were any simpler approach to this.
    >
    No - there isn't.
    You will have to use new names for the constraints. That usually means extracting the DDL and manually changing the constraint names.

  • Create table from DBMS_SHARED_POOL.SIZES output

    How can I create a table from the output of DBMS_SHARED_POOL.SIZES output ... If possible at all?
    Thank you !

    Your conclusion is just wrong. dbms_shared_pool.keep is geared at procedures and functions which you are calling over and over again, and which you can't afford to be reloaded often.
    The only thing you avoid by pinning a procedure is the overhead of reloading.
    Secondly in both cases you perform 10000000 inserts instead of 1 bulk insert and this is taking time.
    What you should do is
    SQL> l
    1 insert into scott.test
    2 select trunc(dbms_random.value(10,40)), trunc(dbms_random.value(10,40))
    3 from dual
    4* connect by level <= 1000000
    I can insert 1 million rows in 14.51 seconds
    Your method is the slowest possible.
    And yes, you always should use a spfile, but this has nothing to do with the problem at hand.
    Sybrand Bakker
    Senior Oracle DBA

  • How to create table from method

    Hello -
    Could anyone please tell me how can I create af:table with more than one column from an AppsModule method.
    When I have a 1d array return eg:
    public String[] createTable(){
    String[] str = new String[1];
    return str;
    I can drop it as a table and one column gets created. But how can I get mutiple columns in a table. I want to write a method, which when dropped on jsp page create table with multiple columns.
    I am using ADF 11g.
    Please suggest.
    Regards -
    Rohit

    Hi,
    for this you use an array or array list of objects. The object represent the row content, e.g. Person. The Person class then has setter/getter for each of the properties that you want to show in a column
    Frank

  • How to create table from another in pl/sql

    Hi I need to create a table from another in pl/sql
    How can I do this

    The proper way to do this, is not to do it in PL/SQL. But do it in SQL, something like:
    create table tbl
    as
    select *
      from other_tbl;Doing it in PL/SQL is really slow compared to SQL.
    Yes, if you really want to create a table using PL/SQL then you will need to use DBMS_SQL or EXECUTE IMMEDIATE (Native Dynamic SQL) to do this.

  • Question on Creating Table From Insert statement

    Hi,
    I want to create a table using a DBlink from another database using the create/insert statement. Will it also transfer the constraints or do I have to do it manually afterwards? Thanks.
    Create table T1
    SELECT a,b,c from T2 from DB@dblink;

    As discussed above, the constraints, indexes, triggers are not copied. Only NOT NULL constraints are copied.
    Look at this thread Re: Copying table structure.
    for copying triggers/indexes from source table to destination table.
    Thanks,
    Navaneeth

  • Question on Creating table from another table and copying the partition str

    Dear All,
    I want to know whether is there any way where we can create a table using another table and have the partitions of the new table to be exactly like the used table.
    Like
    CREATE TABLE TEST AS SELECT * FROM TEMP;
    The table TEMP is having range and hash partitions.
    Is there any way when we use the above command, we get the table partitions of TEMP to be copied to the new table TEST.
    Appreciate your suggestions on this one.
    Thanks,
    Madhu K.

    may this answer your question...
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:595568200346856483
    Ravi Kumar

  • Creating Tables From a Master Table?

    Hi all,
    I am trying to create tables that are generated from a master table. The reason behind this is I want to easily be able to modify this master table and then be able to print a well laid out invoice without all the extraneous information. I'm not really explaining this well so here is an example.
    My Master Table is on it's own sheet and has a categorized listing of products like so:
    Fruit
    Bananas, 5 units, $1.00
    Apples, 3 units, $0.50
    Peaches, 0 units, $2.00
    Grains
    Bread, 0 units, $1.00
    Oatmeal, 0 units, $2.00
    Vegetables
    Lettuce, 4 units, $2.00
    Celery, 6 units, $1.50
    Carrots, 2 units, $3.50
    On a seperate invoice sheet I would have multiple tables laid out to print. It will have a summary table like this:
    Summary
    Fruit, Subtotal $6.50
    Vegetables, Subtotal $24.00
    Total $30.50
    and seperate tables for each category:
    Fruit
    Bananas, 5 units, $1.00
    Apples, 3 units, $0.50
    Subtotal $6.50
    Vegetables
    Lettuce, 4 units, $2.00
    Celery, 6 units, $1.50
    Carrots, 2 units, $3.50
    Subtotal $24.00
    Notice it does not include the peaches or grains since I didn't actually sell any units of those.
    Is this possible? Can anyone point me in the right direction? Thanks.

    Most of this looks possible. The most obvious exception is not showing the separate table for grains when no grains are shown.
    A table has a defined number of rows and columns. That number may be changed manually, but I know no way of either adding or removing rows (or columns) through the use of formulas. If you want to use separate tables for each of these, you will need to set up four separate tables, each with the number of columns needed and, assuming there is a possibility that any particular order may include all items in at least one category, each with as many rows as there are items in the category for that table.
    If you are willing to forego separate tables on the Invoice, then an outcome similar to what you ask is likely possible.
    In your example, you have listed the subtotals for each category in which there has been an order at the top of the page, then have repeated those subtotals in a second line in each separate table. Why?
    Regards,
    Barry

Maybe you are looking for

  • TX 2500 lock ups

    My TX 2500 regularly locks up with when I plug in or unplug the computer from the AC adapter.  The thing is, I have to be watching flash video to do it.  I have to force shut down the computer, and when I restart, nothing comes up.  After a 2nd force

  • Adobe form print problem

    Hi all, I'm new to Adobe forms. I have created a new abode form and trying to execute the function module from SFP transaction itself. after executing its asking for printer. there are three printers configured in my system. No matter which printer i

  • App Store rejects all my credit cards

    I'm italian and I have 2 credit card (postepay and paypal) and everytime I try to buy something Apple Store don't recognize my credit card. The error message tell me there are some mistake, but I have used this card before to buy app for my iPhone o

  • Can't download purchased iPad apps

    I have searched these boards, Google, other boards, and have tried all of their suggestions but have had no resolution.  I have 11 iPad apps that cannot download in iTunes.  Everytime I open iTunes, they all try to download and fail instantly and I'm

  • Ikon CPP 550 not working under Snow Leopard, please help.

    I tried to install the drivers for this. I am using the Fiery X3eTY2 65C-KM PS Color Server v1.0 as the selected driver since that is what I've been using prior to 10.6. But now everytime I go to print, I get this "The printer software was installed