Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sicdude
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?  

 

Labels (1)
1 Solution

Accepted Solutions
Nicole-Smith

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
Nicole-Smith

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;

sicdude
Contributor III
Contributor III
Author

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