Discussion Board for collaboration on QlikView Scripting.
I have three tables and im using qualify on both to rename the fields but unqulaifying one field that which i rename to be the join between all three tables.
The problem is that two tables will join but I cant get the second table's field to rename!! Ive tried rename field To , rename as within the load..
How can I rename the field in the qualify of the second table so that all three tables will join ?
SQL SELECT *,
1 AS countfields
UNQUALIFY fieldname2 ;
fieldname3 as fieldname1 , //// JOIN
1 AS countfield
And have you tried:
rename field ABC to XYZ from Filteredtable2;
I think you need to mention the Tablename also.. like
Rename field Filteredtable2.FieldName to FieldName;
Not really sure what you are trying to achieve. Some sample lines of data and expected result may help to understand.
These tables link on fieldname1:
LOAD *, 1 AS countfields INLINE [
fieldname1, fieldname2, fieldname3
UNQUALIFY fieldname1 ;
LOAD fieldname2 as fieldname1, fieldname3, 1 AS countfields INLINE [
LOAD fieldname2, fieldname3 as fieldname1, 1 AS countfields INLINE [
yes doesnt seem to rename the field or says the fieldname is already in use.
swuehl im trying to join three tables loaded via sql and qualify two of the tables apart from the single field from all three that will be the join.
I have to also rename the field though and I can only seem to rename in one of the table loads?
I believe there are limitations on RENAME of / to key fields, because there is more involved than just changing the name. So I think you need to go for AS in table load.
that only seems to work in the last table load but its in the second table that i want to rename a field with as but it appears' to do nothing?
Have you checked my previous post including the script code? I renamed in both table loads a field to fieldname1, thus having all tables linked by fieldname1.
If this does not work for you, please post an potentially executable script (e.g. using INLINE tables like above) that shows your setting.