Syntax Rules for Column Descriptions
<select_expression>
This database query is formulated in the same way as a SELECT statement, however, instead of SELECT, the keyword DATAEXTRACT or EXTRACT DB is used. All options of a SELECT statement are permitted:
· Select the result columns and determine their order in the result table
· Join multiple tables
· Use qualifications to select result lines
· Specify sort order
· Specify locks (WITH LOCK)
Use this syntax rule in a DATAEXTRACT command to specify which columns in a table to extract.
DATAEXTRACT * FROM article
OUTFIELDS
ano 01-08
descr 09-39
stock
40-51
min_ord 52-63
price 64-74
weight 75-85
OUTFILE 'article.data' FORMATTED
DATAEXTRACT ano,descr,stock,min_ord FROM article order by ano
OUTFIELDS
ano 1
descr 2
stock
3
min_ord 4
OUTFILE 'article.data'
DATAEXTRACT ano,descr,stock,min_ord FROM article WITH LOCK
OUTFIELDS
ano 1
descr 2
stock
3
min_rod 4
OUTFILE 'article.data'