June 28, 2004 at 2:41 pm
SELECT SUM(CONVERT(integer, CAST(tablename.columnnameA AS varchar))) AS [Total Units], tablename.columnnameB, tablename.columnnameC FROM table INNER JOIN tableC ON tablename.columnname = tablename.columnname WHERE (DATEPART(mm, table.creationDate) = '5') AND (DATEPART(yyyy, table.creationDate) = '2004') AND (table.columnname = '3') AND (tablename.columnname = '1925') GROUP BY tablenameA.columnname, tbalenameB.colname
when I run the above in IIS I get an incorrect Total Units value. it is one less than what is shown when I execute the query right on SQLServer2K.
I hope I've provided enuff info to get a response as I'm new to this.
June 29, 2004 at 6:29 am
It may be obvious, but check that your IIS page is connecting to the same server and database that you are running the query on. Check the contents of the connectionname.connectionstring property in the page on IIS.
Regards
Peter
June 29, 2004 at 6:33 am
I added a the connection string to my page and sure enough got the correct results. It's these obvious little mistakes that keep me spinning my wheels for hours sometimes.
Thanks!!
Rich
June 29, 2004 at 7:25 am
Sometimes it just needs a fresh pair of eyes, to look at the problem from a different angle.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply