SELECT *
FROM [dbo].[A] a
INNER JOIN [dbo].[NM] nm ON a.ID = nm.PropertyId
INNER JOIN [dbo].[PRO] pro ON pro.ID = nm.PropertyID_FK
WHERE a.Set = 'Pl_ch';
-- GROUP BY a.NR // The multipart identifier could not be bound
-- Order by a.NR // The multipart identifier could not be bound
在上面的查询中添加Order by或Group by会出现错误:
无法为a.NR字段绑定多部分标识符。
为什么不起作用?
答案 0 :(得分:0)
无法绑定多部分标识符,这意味着编译器无法找到指定的列。
str = "string"
iterator = str[Symbol.iterator]()
while ( ( result = iterator.next() ) && !result.done ) { // Parenthesis seem to take precedence
console.log( result.value )
}
来Order By
after
如果您使用where
,那么您可以仅选择中存在的列想要选择其他列,您必须使用聚合函数。
group by
答案 1 :(得分:0)
当Say的多部分标识符无法绑定时意味着 编译器无法找到指定的列。
因此,您可能在表A中没有列NR或者可能列名可能包含空格。
因此,请确保Column正确剥离,如果Column Name中有空格,请使用Square Brackets指定列名称。与$('.testing123').empty();
$(".testing123").append("<%= escape_javascript(render 'notifications/notification', notifications: @notifications) %>");
代替A.[NR ]
答案 2 :(得分:-1)
一些想法: