Коллеги, а можно как то проверить налничие поля в таблице ?
//Iterate through the loaded tables
For t = 0 to NoOfTables() - 1
//Iterate through the fields of table
For f = 1 to NoOfFields(TableName($(t)))
AppTables:
Load
TableName($(t)) as Table,
TableNumber(TableName($(t))) as TableNo,
NoOfRows(TableName($(t))) as TableRows,
FieldName($(f),TableName($(t))) as Field,
FieldNumber(FieldName($(f),TableName($(t))),TableName($(t))) as FieldNo
Autogenerate 1;
Next f
Next t;
t = Null();
f = Null();
Left Join (AppTables) Load *,
RowNo() as row
Resident AppTables;
//Создание формул в скрипте загрузки.
//Формулу можно вызвать в интерфейсе так: =$(=FirstSortedValue(Field_Count, row, 1))
Left Join (AppTables) Load Distinct
row,
'Count( DISTINCT ' & Field & ' )' as Field_CountDistinct,
'Count( ' & Field & ' )' as Field_Count
Resident AppTables;