Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter EightData Functions (continued)

TableDeleteDuplicates Function

Overview

The TableDeleteDuplicates function removes duplicate rows of a table based on row content and optionally specified columns.

Syntax/Parameters

Syntax

int = TableDeleteDuplicates ( string table[][], [int column | string column, ...] );

Parameters

table

An array of string data which must resolve to two-dimensions.

column

Zero but not more than three column specifications to used as a basis of comparison. The specification can be an int as a zero-based columns index or a string as a key name. The first specified column is used for the primary comparison. If the first specified column has equal data, the next column is compared. If a key is specified, it must exist. If omitted, all column are compared.

Return Value

Returns an int as as the number of rows removed or a formatted error code. Use the GetLastError function to retrieve error information.

Remarks

The TableDeleteDuplicates function deletes any duplicate rows as measured by the column specification or the entire row. All comparisons are exact matches. when columns are specified, all the other column are ignored during comparison.

Table order is not altered. Not that is row keys are used they key positions are not altered if a row is deleted.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic