Contest, Детальна інформація

Contest
Тип документу: Реферат
Сторінок: 7
Предмет: Іншомовні роботи
Автор: Олексій
Розмір: 10.2
Скачувань: 1447
Clauses

The name of the new file to which COPY TO copies data is specified with .  If you do not include an extension with the file name, the default extension for the specified file type is assigned.  If you do not specify a file type, COPY TO creates a new table/.DBF and assigns the table/.DBF file name the default extension .DBF. 

FIELDS

If you include FIELDS and a field list, you can specify which fields are copied to the new file.  If the FIELDS clause is omitted, all fields are copied to the file.  If the file you are creating is not a database, memo fields aren't copied to the new file even if memo field names are included in the field list.

The scope clauses are:  ALL, NEXT , RECORD , and REST.  These are explained in the Overview of the FoxPro Language chapter in the FoxPro Language Reference.  Commands which include operate only on the table/.DBF in the active work area.

You can specify a scope of records copied to a file.  Only the records that fall within the range of records specified by the scope are copied.

The default scope for COPY TO is ALL records.

FOR

If the FOR clause is included, only the records for which the logical condition evaluates to true (.T.) are copied to the file.  Include FOR to conditionally copy records, filtering out undesired records. 

Rushmore optimizes COPY TO with a FOR clause if is an optimizable expression.  For best performance, use an optimizable expression in the FOR clause.  A discussion of Rushmore optimizable expressions appears in the Optimizing Your Application chapter in the FoxPro Developer's Guide.

WHILE

If WHILE is included, records are copied as long as the logical expression evaluates to true (.T.).

[WITH] CDX | [WITH] PRODUCTION

If the table/.DBF you copy from has a structural index file, you can create a structural index file for the new table/.DBF.  Including CDX or PRODUCTION creates an identical structural index file for the new table/.DBF.  The tags and index expressions from the original structural index file are copied to the new structural index file.  The CDX and PRODUCTION clauses have the same effect.

Do not include CDX or PRODUCTION if you are copying to a file other than a new FoxPro table/.DBF.

NOOPTIMIZE

Include NOOPTIMIZE to cause Rushmore to not optimize COPY TO.  For more information, see SET OPTIMIZE or consult the discussion of Rushmore optimization in the Optimizing Your Application chapter in the FoxPro Developer's Guide.

TYPE

If the file you are creating isn't a FoxPro table/.DBF, you must specify its file type.  Although you must specify a file type, you need not include the key word TYPE.  You can create a wide variety of different file types including DELIMITED ASCII text files in which you can specify a field delimiter.

FOXPLUS

FoxPro memo files have a different structure than FoxBASE+ memo files.  If your source FoxPro table/.DBF contains a memo field, include the FOXPLUS clause to create a table/.DBF that can be used in FoxBASE+.  The FoxPro memo field cannot contain binary data because FoxBASE+ does not support binary data in memo fields.

SDF

An SDF (System Data Format) file is an ASCII text file in which records have a fixed length and end with a carriage return and line feed.  Fields aren't delimited.  The SDF file name is assigned a .TXT file extension if you do not include an extension.

SYLK

A SYLK file is a Symbolic Link interchange format (used in Microsoft MultiPlan) in which fields from the FoxPro table/.DBF become columns in the spreadsheet and records become rows.  SYLK file names have no extension.

DELIMITED [WITH | WITH BLANK | WITH TAB]

A DELIMITED file is an ASCII text file in which each record ends with a carriage return and line feed.  The default field separator is a comma.  Since character data may include commas, character fields are additionally delimited with double quotation marks. 

In the following example there are 2 character fields ("Smith" and "TELEPHONE") delimited with double quotation marks.  There is one numeric field which is not delimited since numeric data does not contain commas.  The 3 fields are separated with commas.

"Smith", 9999999, "TELEPHONE"

The DELIMITED WITH option can be used to replace the double quotation marks with one of your choice.

The online video editor trusted by teams to make professional video in minutes