Qlik Community

Qlik Sense Advanced Authoring

Discussion board where members can learn more about Qlik Sense Advanced Authoring.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Associated field coming through as two different data types on load

I have a multi-concatenated data table from different data sources that all use (we'll call it) ClientID.   I also am seperately importing the Client table with the name, address,  phone# ect...

all of the originating data sources have this field as a varchar(9) in SQL.  Some of the values of ClientID might have leading zeros which is why it is a varchar and not an integer.  

 

My main datatable imports it fine, but the Client table gets imported as a number and is causing my association on the field, from the main datatable to the Client table, to not work properly

what might I need to do to alter my import script to fix this?  

 

1 Solution

Accepted Solutions
Highlighted

In your load, you can wrap the field in the text() function to keep it as a text value:

Table:
LOAD Text(ClientID) AS ClientID, Field2, Field3;
SELECT ClientID, Field2, Field3
FROM SqlTable;

View solution in original post

2 Replies
Highlighted

In your load, you can wrap the field in the text() function to keep it as a text value:

Table:
LOAD Text(ClientID) AS ClientID, Field2, Field3;
SELECT ClientID, Field2, Field3
FROM SqlTable;

View solution in original post

Highlighted
Contributor III
Contributor III

it's always the simplest things that cause the biggest headaches.  The bane of my programming career is the smallest little things 🙂   Thank you!