首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在SSRS中修改SQL时出现"Object reference not set to an object instance“错误

在SSRS中修改SQL时出现"Object reference not set to an object instance“错误
EN

Stack Overflow用户
提问于 2014-04-25 23:34:29
回答 1查看 1.7K关注 0票数 0

当我试图修改dataset背后的SQL时,我被Microsoft的一个非常有用的错误消息弄糊涂了。原始SQL为

代码语言:javascript
复制
Select * from Denormalized_V
where (@Instructor = '<ALL>' and [Section Code] in (@SectionList)) or
      (@Instructor <> '<ALL>' and [Section code] in (@SectionList) and [Instructor Name]     Like @Instructor)
order by [subject], [course], [course section], [respondent code]

新的SQL是:

代码语言:javascript
复制
Select * from Denormalized_V
where Term = @Term and [Subject] = @Subject and Course in (@Courses) and
  ((@Instructors = '<ALL>') or ([Instructor Pid] = @Instructors or [Instructor Pid] = 'ALL')) and [Course Section] in (@Sections)
order by [subject], [course], [course section], [respondent code]

我从查询设计器中执行执行操作,它返回值,所以我不明白为什么在我点击Ok的那一分钟就会出现"Object reference not set to an object instance“错误。

以前有没有人见过这种类型的pf行为?

EN

回答 1

Stack Overflow用户

发布于 2014-04-26 03:29:36

我想通了。这是我的错。我有一个在SQL中命名错误的参数。这些简单的错误中的一个,需要永远去捕捉。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23297349

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档