Each GROUP BY expression must contain at least one column that is not an outer reference

前端 未结 7 1784
-上瘾入骨i
-上瘾入骨i 2020-12-09 07:50

What am I doing wrong here? I am getting this error on:

SELECT LEFT(SUBSTRING(batchinfo.datapath, PATINDEX(\'%[0-9][0-9][0-9]%\', batchinfo.datapath), 8000),         


        
7条回答
  •  天涯浪人
    2020-12-09 08:39

    I just found this error., while using GETDATE() [i.e outer reference] in the group by clause in a select query.

    When replaced it with date column from the respective table it cleared.

    Thought to share as a simple example. cheers ;)

提交回复
热议问题