Ar8itrator
Ar8itrator

Reputation: 23

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. '

Upvotes: 0

Views: 103

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1270873

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

[Encounter Number] in ('12345678910', '10987654321', '11121314151')

Upvotes: 1

Related Questions