这些查询包括
选择t.col 1,
t.col2、
(选择计数(col1) )
from tab
where col1=t.col1
and col2=t.col2
) as col3
from tab t
where col3 1
此查询发出了“col3无效标识符”错误。
我尝试了各种变体来定义下面列出的别名和使用它们时出现的错误
选择t.col 1,
t.col2、
(选择计数(col1) )
from tab
where col1=t.col1
and col2=t.col2
) as 'col3'
from tab t
where col3 1
错误: col3无效的标识符
选择t.col 1,
t.col2、
(选择计数(col1) )
from tab
where col1=t.col1
and col2=t.col2
) as 'col3'
from tab t
where [col3] 1
错误:公式在哪里丢失的
选择t.col 1,
t.col2、
(选择计数(col1) )
from tab
where col1=t.col1
and col2=t.col2
(col3) )。
from tab t
where [col3] 1
错误:公式在哪里丢失的
请说明我的错误是什么
附件:我不知道为什么不能在这里将查询示例标记为代码。 我为这些查询的可读性差而道歉