What is the problem with my query I can't figure it out.
Select id, name, description, road_st, sub_area, area, website, email, category,
working_hrs, inside_building, logo, latitude, longitude,
geom.STNumPoints() as vertices,
geom.STAsText() as geom,house_no,building,shop
from Points
where @hr.STIntersects(geog)= 1
and deleted=0
and (select s.name from Sub_Category s where s.id=category)
like '%'+@text+'%'
ERROR :
if @text='store'
I am getting no result... but there is a row in SUb_category table named "Departmental Store"
the query is working fine till
Select id, name, description, road_st, sub_area, area, website, email, category,
working_hrs, inside_building, logo, latitude, longitude,
geom.STNumPoints() as vertices,
geom.STAsText() as geom,house_no,building,shop
from Points
where @hr.STIntersects(geog)= 1
and deleted=0
it gives no results when i add this line
and (select s.name from Sub_Category s where s.id=category)
like '%'+@text+'%'
whats wrong with this line?