Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to link a few tables together but the fields do not link! What happend though is the apearing of a weird table, called @Syn1 Table.
This happened automaticly. Can I break this link?
Hi Richard,
here are an "QV help" extract:
Sometimes it is necessary to rename fields in order to obtain the desired associations.
It could be that two fields are named differently although they denote the same thing, e.g. ID in a table Customers and CustomerID in a table Orders. Obviously they both denote a specific customer identification code and should both be named CustomerID or something similar.
It could also be that two fields are named the same way but actually denote different things, e.g. Date in the table Invoices and Date in the table Orders. These should preferably be renamed InvoiceDate and OrderDate or something similar.
There could also be plain misspellings in the database or different conventions on upper and lower case letters. (Since QlikView differs between upper and lower case letters it is important that corrections are made.)
Fields can be renamed in the script, so there is no need to change the original data. There are two ways to do it:
The load or select statement can be preceded by an alias statement.
Alias ID as CustomerID;
Load * from Customer.csv;
The load or select statement can contain the as specifier.
Finally, it is also possible to rename list boxes and other sheet objects, thereby changing the labels while keeping the logical associations defined by the field names intact. Choose Properties from the object menu of the sheet object.
Rainer
Hi Richard,
here are an "QV help" extract:
Sometimes it is necessary to rename fields in order to obtain the desired associations.
It could be that two fields are named differently although they denote the same thing, e.g. ID in a table Customers and CustomerID in a table Orders. Obviously they both denote a specific customer identification code and should both be named CustomerID or something similar.
It could also be that two fields are named the same way but actually denote different things, e.g. Date in the table Invoices and Date in the table Orders. These should preferably be renamed InvoiceDate and OrderDate or something similar.
There could also be plain misspellings in the database or different conventions on upper and lower case letters. (Since QlikView differs between upper and lower case letters it is important that corrections are made.)
Fields can be renamed in the script, so there is no need to change the original data. There are two ways to do it:
The load or select statement can be preceded by an alias statement.
Alias ID as CustomerID;
Load * from Customer.csv;
The load or select statement can contain the as specifier.
Finally, it is also possible to rename list boxes and other sheet objects, thereby changing the labels while keeping the logical associations defined by the field names intact. Choose Properties from the object menu of the sheet object.
Rainer
ie, Say Table1 with columns A. B, C
and a Table 2 with columns A, B, D
If you load, these two tables into qv, then a synthetic table will form like this:
Syn Table with columns A,B and Table1 and Table2 will be joined using this SynTable
It is recommended to remove the synthetic tables, by renaming the fields
Of course, it may well be that more than one field actually joins two tables. In this case, it is usual to create a single field that the tables can be joined on instead and either renaming the original columns to make them unique in the table or they may now be spurious. You can achieve this perhaps by concatenating the fields together:
key1 & key2 as keyfield
or by having the system generate a unique numeric key based on the values:
autonumberhash128(key1, key2) as keyfield
which is normally most efficient.
Regards,
Gordon
Thx for the answers. I'm gonna try ans rename the fields.