01-06-2014 06:06 PM
I would like to join two tables using one of EG's built in features like query builder. The two columns I would like to use contain matching characters, but also contain other extraneous ones. Both columns are character columns, but one contains a max length of 12 and the other a max length of 128. Is it possible to join these two tables?
Example Column 1
Example Column 2
01-06-2014 08:05 PM
Could you please explain a bit more like what you have and what you would like to get?
You can chnage the length. But it looks like your column1 (numeric part)) are same as the numeric part of column2.
Do you like to match on these?
Here is a suggestion:
create a column (say match_col) as the numeric part from Column1
create a column(same name match_col) as the numeric part from Column2
then match the tables on match_col
01-09-2014 02:46 PM
I have two tables, and I would like to use the common numbers between one column in each table to merge two tables into one.
I don't know how to create new columns and only bring the numbers over from the existing columns I would like to match.
01-09-2014 02:58 PM
Yes it's possible.
In your example it looks you can make them "look" the same.
So lets work on making the columns in Table 2 look like the ones in Table 1.
It looks like the ones in table one all start with E and have 6 digits afterwards. Assuming this is consistent across all your data, then we can make the ones from Table 2 similar by
1) Extracting first portion of the email (use Scan() Function)
2) Making the number a length of 6 by zero padding. (Use Z6. Format in a put statement)
3) Adding an E to the beginning (Concatenate)
For EG make a calculated column that implements this and then join on the calculated column.