Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
Is it possible to know wich fields are currently QUALIFIED ?
So, is there any system variable wich store the fields we actually want to QUALIFY.
i.e.:
UNQUALIFY *;
DATA:
QUALIFY name, society;
LOAD id, name, society FROM qvd_file;
Any treatment {
here, I want to know how my field are called; so wich ones have a prefix table name.
};
Check in data model which field are extending to Table like TableName.FieldName ...
Check in data model which field are extending to Table like TableName.FieldName ...
I don't think there is any way in script to detect what the current qualify is, or to determine what has been qualified already.
-Rob
Thanks for your suggestion.
Effectively, I've make an information table, browsing the data model, using the functions NoOfTables() and NoOfFields().
It's not very perfect, because it may have some errors, as a fieldName wish has been renamed; but I can't do better.
So:
DATA:
LOAD '' as tableName, '' as fieldName, '' as isQualified
autogenerate(0);
for i = 0 to NoOfTables() - 1
for j = 1 to NoOfFields(TableName($(i)))
let vTableName = TableName($(i));
let vFieldName = FieldName($(j), TableName($(i)));
let vIsQualified = if (SubField(vFieldName, '.', 1) = vTableName, true(), false());
LOAD '$(vTableName)' as tableName, '$(vFieldName)' as fieldName, '$(vIsQualified)' as isQualified
autogenerate(1);
next j;
next i;
Regards.