我的查詢出現了什麼問題我無法弄清楚。where子句中的select語句sql
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 '%'[email protected]+'%'
錯誤:
如果@text='store'
我越來越沒有結果......但有一個名爲「百貨大樓」
查詢中SUb_category表中的一行工作正常,直到
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 '%'[email protected]+'%'
這條線怎麼了?
什麼錯誤得到? – NoobEditor
if @ test =「store」 我沒有得到任何結果......但在SUb_category表中有一行名爲「Departmental Store」 – user3382149
可能是因爲你有一個錯字??? ,您的查詢顯示'@ text'和您發佈的錯誤說'@ test' .. :) – NoobEditor