Unix Technical Forum

SQL query fails

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 02:35 AM
dito
 
Posts: n/a
Default SQL query fails

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 02:36 AM
Simon Hayes
 
Posts: n/a
Default Re: SQL query fails


"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


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com