sql - 查询在 From 子句错误中给了我一个语法错误
问题描述
此 SQL 查询在较旧的 MS Access 文件中完美运行,但在为较新的表重新创建它后,它在 from 子句中给我一个语法错误。
select * from ( with dso as (select month, product_line, third_cust_indic as sales_type,
sum(sales) + sum(beg_snb_ra) as beg_sales,
可能是什么问题呢?
解决方案
如果这是 SQL Server,则该with
语句需要位于select
:
with dso as (
select . . .
. . .
)
select . . .
推荐阅读
- python - 将 json 转换为 Pandas 数据框
- spring-boot - Spring Cloud Config Server-GITLAB SSH连接
- angular - 如何将 UUID 列表绑定到 mat-checkboxes 的 FormArray
- c# - 进程未使用 ParallelForEachAsync 并行运行
- angular - 离子语音识别 - 运行时错误 Object(...) is not a function at hasPermission
- google-apps-script - 转到特定单元格的左上角
- c# - Azure Function Environment Variables
- sql - 如何针对两种不同的条件将日期从一个表插入另一个表
- c# - 如何在从大文件中读取对象时过滤 JSON 数组中的对象
- java - 使用 JPA、spring 和带有 pom.xml 依赖项的单元测试构建 Maven 项目最需要什么?