Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have some question regarding QV. Not sure how to put it so I will just ask by giving example.
I load such script:
Table1:
load
*
Inline [
FieldA, FieldB, FieldC
1,1,1
2,2,2
3,3,3
];
Table2:
load
*
Inline [
FieldA, FieldD, FieldE
2,2,2
3,3,3
4,4,4
];
After loading such two tables I try to display Table1 in Table box why do I get as a result row from second table added? Is there a way to do that differently?
Table1:
FieldA | FieldB | FieldC |
1 | 1 | 1 |
2 | 2 | 2 |
3 | 3 | 3 |
4 | - | - |
Regards,
Mat
Hi Mat, you can add the 'NoConcatenate' clause tio avoid autoconcatenation:
Table1:
load
*
Inline [
FieldA, FieldB, FieldC
1,1,1
2,2,2
3,3,3
];
Table2:
NoConcatenate load
*
Inline [
FieldA, FieldD, FieldE
2,2,2
3,3,3
4,4,4
];
as the field name is of 1st column is same in the both the tables, it create a synthetic key due to join u r getting this result. change the 1st column name of either one tabl, i mean use alias it ll work
Thanks Ruben but I do not think that is the case here. Autoconcatenation is done when all field titles are the same. Here the tables have common key. When I add noconcatenate it is the same.
Go to your table properties
At presentation level, tick 'Omit Rows when Field is NULL' for FieldB and FieldC
You can use the NoConcatenate option, also take a look at "Supress null values".
You could use:
Qualify FieldA;
In this way it will automatic change the name adding the name of the table in front, eg: Table2.FieldA, and you will have unique fields and the problem will disappear.
You're right, has nothing to do with concatenate, I gave a quick answer and was wrong. It's because '4' is also a value of FieldA.
You can follow the answers from Vinaykumar or Clever, also if from some reason you want to have values from tables separated you can add a field to use as link, ie. IdFieldA, and set a different name for FieldA in each table.
Just take care because this way selections can be made in Table1.FieldA, Table2.FieldA or IdFieldA
The two tables you have loaded are associated because the name FieldA is common to both tables.
After making changes to your load script and loading data, always check the table Viewer (Ctrl-T) to see what the links are between the tables.
These associations are fundamental to the way QlikView links data.