Hi @Bobby P ,
You can try to convert the int data column to nvarchar type through the cast or convert function.(CAST and CONVERT (Transact-SQL))
I wrote an example for testing, please refer to:
CREATE TABLE #tblTest
(FileData varchar(MAX),
num nvarchar(25))
INSERT INTO #tblTest values ('TEST1;Testing 123;',1)
INSERT INTO #tblTest values ('TEST2;Testing.234;',2)
INSERT INTO #tblTest values ('TEST3;Testing 345;',3)
INSERT INTO #tblTest values ('TEST4;Testing 456;',4)
INSERT INTO #tblTest values ('TEST5;Testing5.67;',5)
create table test
(id int)
insert into test values('1'),('2'),('5')
select * from #tblTest a
join test b
on a.num=cast(b.id as nvarchar(25))
drop table #tblTest
drop table test
I have solved similar problems on msdn, you can refer to:
[Conversion failed when converting the varchar value '],' to data type int.
If you have any question, please feel free to let me know.
If the response is helpful, please click "Accept Answer" and upvote it.
Best Regards
Echo