Cast NTEXT to INT for calculation and comparison I need to convert an NTEXT column to an INT so I can perform some checks on it. 

The first check would be is value = 0, and the second would be if it was an even or an odd number.  I've got this mostly figured out except the conversion of the NTEXT to INT. So far what I have is this:

cast((cast(a.[Value1] as nvarchar(max))) as int) = 0


The column data looks like this '0'.  When I run my query I get: 


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


What are my options to get around this; is there a way to make it ignore the quotation marks?
See comment by Martin Smith and https://stackoverflow.com/q/2133946/327165 for overview of why not to use ntext.

In order to get numeric records only, including records with numbers that have quotation marks try this: SELECT REPLACE(CAST(TextValue AS NVARCHAR(MAX)),'''','') FROM Table a WHERE ISNUMERIC(CAST(a.[Value1] AS NVARCHAR(MAX))) = 1