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: 
Not applicable

Two tables with the same column name in my data model

Hi all,

I have the script below, the problem is both tables (client and contact) have a column called "Surname". The script returns contact.Surname; however, I am interesting in client.Surname. IT is unable to rename the column(s). Can I add a prefix to "surname" to specify that I want client's surname? or what is the best way to approach this problem?

Test:

LOAD

Primary_contact,
Surname,

SQL SELECT *
FROM client
left join contact

on client_ID = contact_ID

Regards


10 Replies
Not applicable
Author

Hi presh,

LOAD

Primary_contact,
Surname,

SQL SELECT Primary_contact, client.Surname
FROM client  left join contact
on client.client_ID = contact.contact_ID