I need to join
two tables on column, which in one table is defined as string and in other as integer. In both columns actual data stored is integers. This is given to me by design - I can't change this.
So when I do join MySQL
is fine - it does conversion silently. PostgreSQL
complains. There are CAST
operators, which I can add to query to have strings converted to integers, but CAST function is defined in different RDBMSs differently.
Can I write this query in the way that it works in all (or many) RDBMSs? Alternatively, is there DB abstraction layer, which can do this for me? ADODB
is already used in the project, but I can't see if and how it can be helpful in solving this problem.
Thank you.