I'm comparing columns from two tables. However, one of them contains two-value numbers (like 01
), while the other - one-value numbers (like 1
).
As a result, the following condition doesn't work: `WHERE column_1 <> column_2 (results '01' and '1' are considered not equal).
I was told to add a zero to every number of the second column to the results and tried to use this:
column_1 <> RIGHT(column_2('0' + CONVERT(VARCHAR(2), '1'), 2))
but the error message I get from SQL management Studio is that "right function requires two arguments".
Does anyone have the idea what can be done? Thanks!