Skip to content
Advertisement

SQL Server Database Error Conversion failed when converting the nvarchar value ‘ ‘ to data type int

I am running this in TOAD. Please forgive my ignorance, I am new to SQL.

Select * from Database where [Encounter Number] in ( 12345678910, 10987654321, 11121314151)

it ran once and gave me all of the data I was looking for but now when I execute this query, I keep getting Database Error ‘SQL Server Database Error Conversion failed when converting the nvarchar value ‘ ‘ to data type int. ‘

Advertisement

Answer

The column [Encounter Number] is a string, so the comparison value should be strings:

[Encounter Number] in ('12345678910', '10987654321', '11121314151')
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement