| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1202 人关注过本帖
标题:报错如题:The query could not be executed in the allotted memory.
取消只看楼主 加入收藏
刘七七
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2020-10-21
收藏
 问题点数:0 回复次数:0 
报错如题:The query could not be executed in the allotted memory.
以下query, 需要在倒数第二行增加一个或者条件,使其变为:

“WHERE ROW_COUNT = 2 or ROW_COUNT =1 and (DAYOFWEEK(SNAPSHOT_TIMESTAMP) = 7 or SNAPSHOT_TIMESTAMP = MAX_SNAPSHOT_DT))”

但是写完就报错如题:The query could not be executed in the allotted memory.  求解求解求解~

SELECT InputIMEI, InputCarrier, InputProgramName, InputStoreID, InputAddress, InputCity, InputState, InputZip, ActivationDate, LastLoginDate, DeviceStatus, ActiveDeviceCnt, DeviceMatchCnt, TotalIMEIs, TotalActivatedIMEI, LatestDeviceEventTime
, a.SNAPSHOT_TIMESTAMP as SNAPSHOT_TIMESTAMP, MAX(a.SNAPSHOT_TIMESTAMP) OVER () as MAX_SNAPSHOT_DT, b.SNAPSHOT_DATE as SNAPSHOT_DATE
FROM [] a
JOIN
((SELECT * FROM
  (SELECT SNAPSHOT_TIMESTAMP
    , DATE(SNAPSHOT_TIMESTAMP) as SNAPSHOT_DATE
    , COUNT(SNAPSHOT_TIMESTAMP) OVER (PARTITION BY SNAPSHOT_DATE ORDER BY SNAPSHOT_TIMESTAMP) as ROW_COUNT
    , MAX(SNAPSHOT_TIMESTAMP) OVER () as MAX_SNAPSHOT_DT
  FROM []
  WHERE DATE(SNAPSHOT_TIMESTAMP) >= '2019-03-01'
  GROUP BY 1,2 order by 1 desc)
WHERE ROW_COUNT = 2 and (DAYOFWEEK(SNAPSHOT_TIMESTAMP) = 7 or SNAPSHOT_TIMESTAMP = MAX_SNAPSHOT_DT))
) b
ON a.SNAPSHOT_TIMESTAMP = b.SNAPSHOT_TIMESTAMP
搜索更多相关主题的帖子: the query memory 报错 not 
2020-10-21 14:02
快速回复:报错如题:The query could not be executed in the allotted memory.
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050882 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved