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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
New-here1
Contributor III
Contributor III

Field names must be unique within table

Hello,

I am receiving this error message but unsure what the issue is - please could someone help:

EmpTable:
Load
%_ID,
%_ID & '-M' as Manager_ID
%_ID & '-E' as Employee_ID
hr_ID_mdetails as Manager_Name
hr_ID_edetails as Employee_Name
From [my qvd data file]
(qvd);

HierarchyTable:
Hierarchy(Manager_ID, Employee_ID, Manager_Name, Employee_Name)
LOAD *,
1
Resident EmpTable;

Drop Table EmpTable;

Drop Field "1";

Labels (3)
1 Solution

Accepted Solutions
BrunPierre
Partner - Master II
Partner - Master II

As below.

LOAD *;

HierarchyTable:
Hierarchy(Manager_ID, Employee_ID, Manager_Name, Employee_Name)

EmpTable:
Load
%_ID,
%_ID & '-M' as Manager_ID
%_ID & '-E' as Employee_ID
hr_ID_mdetails as Manager_Name
hr_ID_edetails as Employee_Name
From [my qvd data file]
(qvd);

LOAD *,
1
Resident EmpTable;

Drop Table EmpTable;

Drop Field "1";

View solution in original post

5 Replies
justISO
Specialist
Specialist

Hi, not sure is it works, but 2 suggestions I would try:

1. add noconcatenate prefix before HierarchyTable. This will prevent concatenation. Script should look like this:

...

(qvd);

noconcatenate

HierarchyTable:

...

2. Never tried this hierarchy thing, but maybe it could work if you put this

Hierarchy(Manager_ID, Employee_ID, Manager_Name, Employee_Name)

at the beginning of your first table? You will not need this resident table than.

New-here1
Contributor III
Contributor III
Author

Hi Just ISO. Unfortunately, those suggestions did not work as I am still getting the same error message. Thank you for the suggestions though 🙂

BrunPierre
Partner - Master II
Partner - Master II

As below.

LOAD *;

HierarchyTable:
Hierarchy(Manager_ID, Employee_ID, Manager_Name, Employee_Name)

EmpTable:
Load
%_ID,
%_ID & '-M' as Manager_ID
%_ID & '-E' as Employee_ID
hr_ID_mdetails as Manager_Name
hr_ID_edetails as Employee_Name
From [my qvd data file]
(qvd);

LOAD *,
1
Resident EmpTable;

Drop Table EmpTable;

Drop Field "1";

New-here1
Contributor III
Contributor III
Author

This worked, thank you so much BrunPierre. And thank you JustISO  for your help too

BrunPierre
Partner - Master II
Partner - Master II

Sure thing @New-here1