Hello,
I have a text file I'm querying that stores a field as a text.
ComponentID:0000000242
I'm inserting this data into a table that stores this value as a number. Thus truncating the leading zeros.
ComponentID:242
I would like to create a query on the table using an InnerJoin on the text file column:ComponentID:0000000242 and the table column:ComponentID:242 as the unique identifier. Doing this join gives a case error because of the different data types.
Can format ComponentID using a query so it reads from my table as 0000000242 and do an InnerJoin to the text file. In vb
But I'm finding it difficult to get the query to format this correctly.
Unfortunately, i'm unable to change the column data type in the table structure and am looking for a work around. Is this even possible? Any ideas?
Thanks.
I have a text file I'm querying that stores a field as a text.
ComponentID:0000000242
I'm inserting this data into a table that stores this value as a number. Thus truncating the leading zeros.
ComponentID:242
I would like to create a query on the table using an InnerJoin on the text file column:ComponentID:0000000242 and the table column:ComponentID:242 as the unique identifier. Doing this join gives a case error because of the different data types.
Can format ComponentID using a query so it reads from my table as 0000000242 and do an InnerJoin to the text file. In vb
Code:
String= Format(242, "0000000000")
Unfortunately, i'm unable to change the column data type in the table structure and am looking for a work around. Is this even possible? Any ideas?
Thanks.