如何运行此SQL语句sp_configure'显示高级选项',1;在水晶报表中?

问题描述

这是不在Crystal Report中运行的代码。

错误:无法从数据库检索数据。详细信息:ADO错误代码0x80040e14源Microsoft SQL Server本机客户端11.0说明:isp_configure附近的语法不正确。 SQL状态42000本机错误:102 [数据库供应商代码:102

enter image description here

  Declare @ReportDate DateTime
Set @ReportDate={?ReportDateR}

Select * from [SBO_SPEL].[dbo].[U_SPEL_SALES_ANALYSIS_TARGET&ACTUAL_UNIT_F] (@ReportDate)

UNION ALL

Select * from [SBO_SPEL].[dbo].[U_SPEL_SALES_ANALYSIS_TARGET&ACTUAL_SE_F] (@ReportDate)
GO


sp_configure 'show advanced options',1;
GO
RECONFIGURE;
GO
sp_configure 'max server memory',32768;
GO
RECONFIGURE;
GO


WAITFOR DELAY '00:02:00'
GO

sp_configure 'show advanced options',131072;
GO
RECONFIGURE;
GO

解决方法

Crystal将命令或SP中最后一条SQL语句的结果集返回到报告中。但是您的最后一条SQL语句没有结果集。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...