Relative Content

Tag Archive for sqlcastingtype-conversionintegervarchar

Conversion failed when converting the varchar value ‘1.1’ to data type int

I have two columns, one of data type Smallint and the other int. I am trying to concatenate the two columns and a ‘.’ to produce one final value but I keep getting the “Conversion failed when converting the varchar value ‘1.1’ to data type int error”. For instance, if I have ‘1’ in ColumnA and a ‘1’ in ColumnB, I want to concatenate them like CONCAT(ColumnA, ‘.’, ColumnB) to give me the value ‘1.1’. My code is below;