I receive different results with SQL Server on a Windows 2003 Server then on
a Windows 2000 Desktop.
I detached the Database on the Windows 2000 Machine and attached exactly the
same database on the Windows 2003 Server, to make shure that the data are
100% the same. And I still get a different result with exact the same query.
As I run into the problem the first time I imported the data with DTS into
each database. To exclude the posibility that with the import was something
wrong I copied the database as described above.
The Query is executed in the SQL Query Analyser!
The query includes 5 tables and views linked with left joins.
There is no Group by in the statement!
The envoirnments are:
Windows 2003 Server (German)
SQL Server 2000 Enterprise Edition + SP3a
Reporting Services Enterprise Edition + SP2
Windows 2000 SP4
SQL Server 2000 SP3
Reporting Services Enterprise Edition + SP1
.NET 2003
I reinstalled both clients from scratch. There is nothing esle installed as
necesarry to run Reporting Services. On the 2003 Server .NET is NOT installe
d.
And just for the sake of completness: this is no joke and I have more then 5
years expirience in database programming with SQL Server and Oracle. I have
the courage to write this here only becouse I read about a similare problem
related with "group by". Apart from this I don't trust my selfe anymore sinc
e
this happen.
Has somebody any clue to this.If you post the actual query and give some more detail about what the
difference was we might be able to speak more intelligently about the issue.
Andrew J. Kelly SQL MVP
"Dev Main" <DevMain@.discussions.microsoft.com> wrote in message
news:9D4C3B1C-E9F3-4B85-AF70-61550300C49E@.microsoft.com...
>I receive different results with SQL Server on a Windows 2003 Server then
>on
> a Windows 2000 Desktop.
> I detached the Database on the Windows 2000 Machine and attached exactly
> the
> same database on the Windows 2003 Server, to make shure that the data are
> 100% the same. And I still get a different result with exact the same
> query.
> As I run into the problem the first time I imported the data with DTS into
> each database. To exclude the posibility that with the import was
> something
> wrong I copied the database as described above.
> The Query is executed in the SQL Query Analyser!
> The query includes 5 tables and views linked with left joins.
> There is no Group by in the statement!
> The envoirnments are:
> Windows 2003 Server (German)
> SQL Server 2000 Enterprise Edition + SP3a
> Reporting Services Enterprise Edition + SP2
> Windows 2000 SP4
> SQL Server 2000 SP3
> Reporting Services Enterprise Edition + SP1
> .NET 2003
> I reinstalled both clients from scratch. There is nothing esle installed
> as
> necesarry to run Reporting Services. On the 2003 Server .NET is NOT
> installed.
> And just for the sake of completness: this is no joke and I have more then
> 5
> years expirience in database programming with SQL Server and Oracle. I
> have
> the courage to write this here only becouse I read about a similare
> problem
> related with "group by". Apart from this I don't trust my selfe anymore
> since
> this happen.
> Has somebody any clue to this.|||Sorry, I forgot the important part of the message.
Meanwhile I enclosed the problem to a dateformat problem. But not as simple
as it sounds like.
I reduced the query to one table, for which a date criteria is included in
the query.
Select * from Activities Where Activities.Date = '2006-03-06'
(Date is the name of the field for historic reasons and this can't be change
d)
The 2003 Srv interpreds the date YYYY-DD-MM and the 2000 Desktop interprets
it as YYYY-MM-DD. The language settings are the same, both are set to german
and both have the same dateformat in the control panel language settings.
If I change the language settings on the 2003 Srv to English(USA) the date
in the criteria get still interpreted as YYYY-DD-MM, even the language
settings in control panel display the format M/D/YYYY.
If I'm applay '2006-28-02' Query Analyser returns an error. If I use
2006-02-28 the query get execudet an the result comply with YYYY-DD-MM.
"Andrew J. Kelly" wrote:
> If you post the actual query and give some more detail about what the
> difference was we might be able to speak more intelligently about the issu
e.
> --
> Andrew J. Kelly SQL MVP
>
> "Dev Main" <DevMain@.discussions.microsoft.com> wrote in message
> news:9D4C3B1C-E9F3-4B85-AF70-61550300C49E@.microsoft.com...
>
>|||A perfect example of why you should use the ISO or ANSI dateformats. These
should give you all the details:
http://www.karaszi.com/SQLServer/info_datetime.asp
Guide to Datetimes
http://www.sqlservercentral.com/col...sqldatetime.asp
Datetimes
http://www.murach.com/books/sqls/article.htm
Datetime Searching
Andrew J. Kelly SQL MVP
"Dev Main" <DevMain@.discussions.microsoft.com> wrote in message
news:05B6397D-3B11-48D2-BEAE-8222E8C971FE@.microsoft.com...
> Sorry, I forgot the important part of the message.
> Meanwhile I enclosed the problem to a dateformat problem. But not as
> simple
> as it sounds like.
> I reduced the query to one table, for which a date criteria is included in
> the query.
> Select * from Activities Where Activities.Date = '2006-03-06'
> (Date is the name of the field for historic reasons and this can't be
> changed)
> The 2003 Srv interpreds the date YYYY-DD-MM and the 2000 Desktop
> interprets
> it as YYYY-MM-DD. The language settings are the same, both are set to
> german
> and both have the same dateformat in the control panel language settings.
> If I change the language settings on the 2003 Srv to English(USA) the date
> in the criteria get still interpreted as YYYY-DD-MM, even the language
> settings in control panel display the format M/D/YYYY.
> If I'm applay '2006-28-02' Query Analyser returns an error. If I use
> 2006-02-28 the query get execudet an the result comply with YYYY-DD-MM.
>
> "Andrew J. Kelly" wrote:
>|||Thank you Andrew!
I thought the format YYYY-MM-DD address this. The mistake was the "-".
(Should get some sleep, before posting into the newsgroups ;-)
"Andrew J. Kelly" wrote:
> A perfect example of why you should use the ISO or ANSI dateformats. Thes
e
> should give you all the details:
> http://www.karaszi.com/SQLServer/info_datetime.asp
> Guide to Datetimes
> http://www.sqlservercentral.com/col...sqldatetime.asp
> Datetimes
> http://www.murach.com/books/sqls/article.htm
> Datetime Searching
>
> --
> Andrew J. Kelly SQL MVP
>
> "Dev Main" <DevMain@.discussions.microsoft.com> wrote in message
> news:05B6397D-3B11-48D2-BEAE-8222E8C971FE@.microsoft.com...
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment