Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is a $Syn Table?

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?

1 Solution

Accepted Solutions
Not applicable
Author

Hi Richard,

here are an "QV help" extract:

Renaming fields

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.

Example:

Alias ID as CustomerID;

Load * from Customer.csv;

The load or select statement can contain the as specifier.

Example: Load ID as CustomerID, Name, Address, Zip, City, State from Customer.csv;

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

View solution in original post

4 Replies
Not applicable
Author

Hi Richard,

here are an "QV help" extract:

Renaming fields

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.

Example:

Alias ID as CustomerID;

Load * from Customer.csv;

The load or select statement can contain the as specifier.

Example: Load ID as CustomerID, Name, Address, Zip, City, State from Customer.csv;

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

Not applicable
Author

Syn Table refers to a Synthetic Table. This table is formed when two tables have more than one columns in common.

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

Not applicable
Author

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

Not applicable
Author

Thx for the answers. I'm gonna try ans rename the fields.