Category / Section
Joining Tables with Casted Fields: Convert and Join
Published:
In the table join, we maintain the actual schema of the table, which means that the casted field is not available to be joined with the casted type. However, you can achieve this by creating an Expression to convert the corresponding field to the desired type and then use that expression to join the tables.
Convert data type using expression and then join:
-
Convert the string field to a date:
STR_TO_DATE([date_field], 'format_specifier')
-
Convert the string field to a signed INT:
CAST([PersonID] AS SIGNED)
Once the expression is saved it can be used further to perform joining
The expression will only be accessible in the base table (main table), so it is necessary to join the data source with the base data source that contains the expression.