Have a Question?

If you have any question you can ask below or enter what you are looking for!



SQL Server

I have a column which contains Text and Number value. As per requirement I have to select only Number value. I used below query but getting some error

select * from clm_inventory

where PND_CD in (082,085)

But it's giving error that:-

Msg 245, Level 16, State 1, Line 1

\r\n

Conversion failed when converting the nvarchar value \'CT\' to data type int.

Please help me out.

  Rupesh Kumar

Hi Rupesh,

Your query is correct just use below query to get the appropriate result.

select * from clm_inventory

where PND_CD in ('082','085')

Just Used single quotes for your reference.

Regards,


  Devbrat Tripathi       27 Oct 2016       0       0     

Post Your Answers:

Please use the CODE HIGHLIGHT Button to format/highlight your codes if any