Getting error message: conversion failed when converting _A to int
Then you'll need to cast the columns to the same type. I don't know how the column type is defined, so below are both columns in each JOIN explicitly declared:
inner join table2 as table2_a
on cast(table1.col2 as varchar(2)) = cast(table2_a.id as varchar(2))
inner join table2 as table2_b
on cast(table1.col3 as varchar(2)) = cast(table2_a.id as varchar(2))
The table2 has given alternate names to be distinctive in both JOINs and the SELECT.
** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **