您是否曾经让 SQL Server 2008 返回与 SQL Server 2000 不同的结果集? [英] Have you ever had SQL Server 2008 return a different result set than SQL Server 2000?

查看:21
本文介绍了您是否曾经让 SQL Server 2008 返回与 SQL Server 2000 不同的结果集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是在寻求有关我的存储过程的实际代码的帮助(无论如何),但是一个客户给我发送了一份他的 SQL Server 2000 数据库的副本,指出某个特定的 proc 返回了错误的结果;我将数据库恢复到我的服务器 (SQL Server 2008R2) 并运行 proc,它产生了正确的结果.请记住,没有可能导致差异的前端 - 在这两种情况下,我都只是通过企业经理和管理工作室执行过程.

I am not looking for help with the actual code of my stored procedure (yet anyway), but a client sent me a copy of his SQL Server 2000 database stating that a particular proc was returning incorrect results; I restored the database to my server (SQL Server 2008R2) and ran the proc and it produced the correct results. Keep in mind there is no front-end that could be causing the difference - in both the cases I simply execute the proc thru enterprise manager and management studio.

我想知道是否存在可能导致/导致此问题的任何已知差异?这个特定的 proc 使用了很多条件逻辑、默认参数,甚至有一个游标来执行一些循环逻辑,但任何关于可能需要查看的区域的建议都会有所帮助.

I am wondering if there are any known differences that might contribute/cause this problem? This particular proc uses a lot of conditional logic, default parameters and even has a cursor to do some looping logic, but any suggestions on possible areas to look at would be helpful.

澄清一下,返回的行数和列数是相同的,但对于特定列(对于某些行,取决于数据字段的值),该数字恰好是应有的两倍.2008 给出了正确"的答案.2000"给出了错误的答案,即两倍的金额.

to clarify, the number of rows and columns returned are the same, but for a particular column (for certain rows depending on value of a data field), the number is exactly double what it should be. 2008 gives the 'correct' answer. '2000' gives the wrong answer, i.e. the double amount.

推荐答案

导致此问题的原因有很多,包括(但不限于)整理和系统设置.如果我们看到了 SP,我们也许能够发现罪魁祸首.除了部署的变化之外,版本之间还有差异,请参见

There are so many things that could cause this problem including (but not limited to) collation and system settings. If we saw the SP we might be able to spot the culprit. In addition to changes in deployments there are differences between versions see

http://msdn.microsoft.com/en-us/library/ms143179(v=sql.100).aspx

http://msdn.microsoft.com/en-us/library/ms143179.aspx

这篇关于您是否曾经让 SQL Server 2008 返回与 SQL Server 2000 不同的结果集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆