Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

Please See Query for detail

$
0
0
SELECT * FROM 
(
	Select * From TABLE1 where idSchoolYear = 3 and idUserType = 3 AND GradeLevel <> 'GD' AND GradeLevel <> 'K2' 
)AS QRY
WHERE CONVERT(INT,QRY.GradeLevel) > = 7

Hii Guys,

Above Query gives me Error "Conversion failed when converting the varchar value 'GD' to data type int."

As i remove all record related to "GD" and also all varchar fields. so there are all integers in QRY.

AS GradeLevel field is type of varchar.

Any idea why this Happen?


Nikunj Nandaniya


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>