I am using SQL Server Management Studio and have a table defined with S_id AS NVARCHAR (80)
, and this cannot be changed. Now there are some values coming as AEC123, ID-33009, 456KP889 which according to me are causing an error in my following query
CONVERT(bigint, S_id)
and I get an error
Error converting data type nvarchar to bigint
How do I fix this? If there are values of S_id
such as described above should be excluded from my SELECT
statement, how do I achieve this?