Difference between revisions of "Importing and Exporting Data"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) (→Import from XML) |
Yvonnemilne (Talk | contribs) (→Import from XML) |
||
Line 4: | Line 4: | ||
===Import From Text Files=== | ===Import From Text Files=== | ||
===Import from XML=== | ===Import from XML=== | ||
− | The [[SQL | + | The [[SQL INSERT|SQL insert]] statement allows data to be imported from an XML file: |
<pre> | <pre> | ||
− | + | insert into <table> from [xml] <xml filename> | |
</pre> | </pre> | ||
Line 13: | Line 13: | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | insert into products; | |
+ | from xml prices.xml | ||
</code> | </code> | ||
Revision as of 10:33, 14 January 2010
Contents
Importing and Exporting Data
The into, save as and to clauses supported by the SQL select statement offer a wide range of export formats for the selected rows.
Import From Text Files
Import from XML
The SQL insert statement allows data to be imported from an XML file:
insert into <table> from [xml] <xml filename>
Example
insert into products; from xml prices.xml
Import Live Data using SQL Connectivity Functions
Export to Text Files
select <column-definition> from <table-definition> to file <filename>
Examples
select * from shippers to file shiptxt
Export to XML
select <column-definition> from <table-definition> into xml <xml filename>
or
select <column-definition> from <table-definition> save as xml <xml filename>
Examples
select employeeid, lastname, firstname from employees save as xml emp
Export to HTML
select <column-definition> from <table-definition> into html <html filename>
Export to JSON
select <column-definition> from <table-definition> into json <filename>