Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I would like to know the difference between 'qualify & unqualify ' statements and 'Key field' deceleration
and giving 'Alias' to fields.Because all above doing same effect that breaking key.
So let me know the diffrence between these and when to use.
Thanks & Regards
Jai
The QUALIFY statement puts the tablename before each field that is indicated in the table when loaded.
For instanc
qualify *; | turns qualification on for all field names. |
qualify "*ID"; | turns qualification on for all field names ending with ID |
qualify "NR*", A; | turns qualification on for A and all field names beginning with NR. |
The UNQUALIFY statement does the opposite.
unqualify *; turns qualification off for all field names.
unqualify '%*_Key'; turns qualification off for all fields that start with a % and end with '_Key'
The last UNQUALIFY statement is often used to denote key fields.
QUALIFY *;
UNQUALIFY '%*_Key';
Employee:
LOAD id AS %EmployeeId_Key, // the use of AS here is giving the field 'id' an alias named %EmployeeId_Key
name,
address,
city,
.....
FROM Employee.qvd (qvd);
This would give the following fields
%EmployeeId_Key
Employee.name
Employee.address
Employee.city
The field %EmployeeId_Key can now easily be used to link two or more tables. This a key field.
We could create another table with the same key to link them.