This is a discussion on SQL query fails within the SQL Server forums, part of the Microsoft SQL Server category; --> As of about 2 months ago, sql queries on a frontpage .asp page required that the variable from the ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| As of about 2 months ago, sql queries on a frontpage .asp page required that the variable from the sending page be included in the query results, or the query failed. The query also seemed to become case sensitive. i.e. "select last,first,sales from names where city = '::city::'" will fail unless it's written as: "select city,last,first,sales from names where city = '::city::'. Why did this happen, and how can I get around it? When I want to only show the last,first,sum(sales) in the result set, the query won't work. I'm forced to include city, then the results show total sales/city/name rather than sales/name. |
| ||||
| "dito" <c_dito@yahoo.com> wrote in message news:720973af.0404230825.41eb4cf6@posting.google.c om... > As of about 2 months ago, sql queries on a frontpage .asp page > required that the variable from the sending page be included in the > query results, or the query failed. The query also seemed to become > case sensitive. > i.e. > "select last,first,sales from names where city = '::city::'" will fail > unless it's written as: > "select city,last,first,sales from names where city = '::city::'. > Why did this happen, and how can I get around it? When I want to only > show the last,first,sum(sales) in the result set, the query won't > work. I'm forced to include city, then the results show total > sales/city/name rather than sales/name. I think you'll have to post some more information - what version of MSSQL do you have, and what does "the query failed" mean? Do you have a specific error message? If something suddenly becomes case-sensitive, it's possible that the DBA changed the table, database or server collation, but that might not be the case, it's just a guess. If this doesn't help, then I suggest you post the DDL (CREATE TABLE) statements for the tables, and also some sample data to explain what you want. You might also want to post in an ASP group if that seems appropriate. Simon |
| Thread Tools | |
| Display Modes | |
|
|