For more information... RTFM!
NAVIGATION
ACCOUNT LOGIN

You are not logged in

Powered by Interchange version 5.7.0

export

Exports a database table to a delimited text file.

Summary

  • [export table]

Parameter Description Default
table The table to export. None
base Alias for table. None
database Alias for table. None
field The column to add (or delete if delete and verify are true). None
file Filename to export to. None
sort Sort the output rows. None
type Specify the column and row delimiter type. None
delete If verify attribute also set, deletes column specified by field attribute rather than adding a column. None
verify Must be true when deleting a column. None
hide

Suppress any output text that would ordinarily be returned from this tag.  (This universal parameter was introduced with Interchange version 5.5.2.)

No

Examples

Perl example

$Tag->export({
    table => $table,
});

or similarly with positional parameters:

$Tag->export($table, $attribute_hash_reference);

Description

Exports the named table to a delimited text file.  Also see the [import] tag which is used to import files into tables.

Parameters

table

The table to export.

field

The column to add (or delete if delete and verify are true).

file

Filename to export to.  Note that the NoAbsolute directive and other conditions may affect actual location of the output file.

sort

Output sorted rows (usage:  sort="sort_field:sort_option").  See search/form variable "mv_sort_option" for sort options.

type

Specifies the row and column delimiter types.  Either NOTES or one of the following:

Type Column delimiter Row delimiter
2 \n \n\n
3 \n%%\n \n%%%\n
4 CSV \n
5 | \n
6 \t \n
7 \t \n
8 \t \n
LINE \n \n\n
%%% \n%%\n \n%%%\n
%% \n%%\n \n%%%\n
CSV CSV \n
PIPE | \n
TAB \t \n

If using NOTES

  • Column delimiter is the value of the notes_separator parameter (defaults to "\f").
  • Row delimiter is the value of the notes_field parameter (defaults to "notes_field").

notes_separator

See the NOTES description in the type parameter.

notes_field

See the NOTES description in the type parameter.

delete

If verify attribute also set, deletes the column specified by field parameter, rather than adding a column.

verify

Must be true when deleting a column.

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Tuesday 22 August 2006 at 5:16 PM (CDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us