我正在尝试使用WHERE
子句跨 3 个表创建 JOIN,但出现错误:
'=' 附近的语法不正确。
我不知道我做错了什么?
这是我的声明:
select
TBL_CS_PROJECT.NAME ,
TBL_CS_LINKS.LINK_URL ,
TBL_CS_CLICKS.CLICK_COUNT
from
TBL_CS_PROJECT
left join
TBL_CS_LINKS on TBL_CS_PROJECT.PROJECT_ID = TBL_CS_LINKS.PROJECT_ID
right join
TBL_CS_CLICKS on TBL_CS_LINKS.LINK_ID = TBL_CS_CLICKS.LINK_ID
WHERE = (CHARINDEX('t', TBL_CS_LINKS.LINK_URL) > 0)
OR (CHARINDEX('t', TBL_CS_PROJECT.NAME) > 0)
order by
TBL_CS_PROJECT.NAME