Difference between revisions of "Importing and Exporting Data"

From Recital Documentation Wiki
Jump to: navigation, search
(Export to JSON)
Line 1: Line 1:
 
==Importing and Exporting Data==
 
==Importing and Exporting Data==
 +
The ''into'', ''save as'' and ''to'' clauses supported by the [[SQL SELECT|SQL select] statement offer a wide range of export formats for the selected rows.
 +
 
===Import From Text Files===
 
===Import From Text Files===
 
===Import from XML===
 
===Import from XML===
 
===Import Live Data using SQL Connectivity Functions===
 
===Import Live Data using SQL Connectivity Functions===
 
===Export to Text Files===
 
===Export to Text Files===
 +
<pre>
 +
select <column-definition> from <table-definition> to file <filename>
 +
</pre>
 +
 +
'''Examples'''
 +
 +
<code lang="recital">
 +
select * from shippers to file shiptxt
 +
</code>
 +
 
===Export to XML===
 
===Export to XML===
 
<pre>
 
<pre>
 
select <column-definition> from <table-definition> into xml <xml filename>
 
select <column-definition> from <table-definition> into xml <xml filename>
 
</pre>
 
</pre>
 +
 +
or
 +
 +
<pre>
 +
select <column-definition> from <table-definition> save as xml <xml filename>
 +
</pre>
 +
 +
'''Examples'''
 +
 +
<code lang="recital">
 +
select employeeid, lastname, firstname from employees save as xml emp
 +
</code>
  
 
===Export to HTML===
 
===Export to HTML===

Revision as of 10:23, 14 January 2010

Importing and Exporting Data

The into, save as and to clauses supported by the [[SQL SELECT|SQL select] statement offer a wide range of export formats for the selected rows.

Import From Text Files

Import from 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>

Summary