Arithmetic overflow error converting nvarchar to data type numeric.select name, tipo = case when [type] = 'Institution' OR [type] = 'Park' OR [type] = 'Marina' OR [type] = 'Museum' OR [type] = 'Stadium or Arena' OR [type] = 'Popular Area' OR [type] = 'Beach' OR [type] = 'District' OR [type] = 'Attraction' then 1when [type] = 'Business Area' OR [type] = 'Convention Centre' then 2 else 3 end, url from CityLocations where CityID = 835 and Latitude < 53.626152 and Latitude > 53.466152 and Longitude < 10.060821 and Longitude > 9.900821 order by tipo