Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: XML
Beldar wrote:
> I have an xml document containing a table definition. How can I use it
> to create a table in a 9.2.0.4 database?
>
> Here's the contents of the file:
>
> <?xml version="1.0" encoding="windows-1252" ?>
> <?xml-stylesheet type="text/xsl" href="Table.xsl"?>
>
> <!-- This is a generated file. Please do not alter. -->
> <!-- Generated from SCIF. SCIF version = 1.1 Source Product =
> PowerDesigner Source Product Version = 7.5.0.739 -->
>
> <Table name='CT_REMINDER_TYPE' idMethod='none'>
> <label>Reminder Type</label>
> <Column name='RT_CODE' primaryKey='<pk>' datatype='varchar(16)'
> nullable='false'>
> <label>Reminder Type Code</label>
> </Column>
> <Column name='PROD_CODE' datatype='varchar(3)' nullable='false'>
> <label>Product Code</label>
> </Column>
> <Column name='SYNC_GUID' datatype='guid' nullable='false'
> defaultValue='SYS_GUID()'>
> <label>Sync Guid</label>
> </Column>
> <Column name='LAST_MODIFIED' datatype='timestamp' nullable='false'
> defaultValue='GET_UTC_DATETIME()'>
> <label>Last Modified Timestamp</label>
> </Column>
> <Key name='PK_CT_REMINDER_TYPE' type='primary key'>
> <key-column name='RT_CODE'/>
> </Key>
> <Foreign-key name='FK_CT_REMINDER_TYPE_PROD_CODE'
> foreignTable='CT_PRODUCT'>
> <reference local='PROD_CODE' foreign='PROD_CODE'/>
> </Foreign-key>
> <Index name='IDX_CT_REMINDER_TYPEUID' unique='true'>
> <Index-column name='SYNC_GUID'/>
> </Index>
> </Table>
>
I'm not aware of any utility which will read a XML file and generate a CREATE TABLE statement. You could always write one though...
If all you have is the above, why not just write the CREATE statement using the information in the XML file? Or is this for something "bigger" than you posted?
HTH,
Brian
-- =================================================================== Brian Peasland dba_at_nospam.peasland.net http://www.peasland.net Remove the "nospam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three" - UnknownReceived on Thu Sep 28 2006 - 10:39:21 CDT
![]() |
![]() |