473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.
Jul 20 '05 #1
1 1765

"dito" <c_****@yahoo.com> wrote in message
news:72**************************@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
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phil Powell | last post by:
Here is the scope of what I need to do; want: enrollment_year allowed (even if null) all of ica criteria:
3
by: Philip Yale | last post by:
A colleague of mine has a query which fails to run under SQLAgent batch with the following error: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime...
15
by: GTi | last post by:
I have a query like: SELECT "ProjectMembers"."RoleText", "ProjectMembers"."Description", "ContactTable"."Name1", "ContactTable"."Name2", "ContactTable1"."Name1", "ContactTable1"."Name2" FROM...
5
by: MX1 | last post by:
Simpler way to ask question from my previous post. I wrote a query and it has a paramter field in it. I want to enter a date with the current year. If it I put in 6/30/2003, it works great. If I...
2
by: Stephen Bowyer | last post by:
I have an Access 97 database, which we use with a VB5 front end. If I create a new query in the database, the string functions left, mid etc do not work. For example the query: CalcField:...
12
by: Joe Stanton | last post by:
Hello Group I have a query that works in Oracle and SQL Server, but fails in Microsoft Access. The query is: SELECT data fromTABLE1 WHERE data>='A&' AND data<'A''' Here is my sample data:
0
by: Winterminute | last post by:
I am trying to read a list of install programs using WMI with ASP.NET/C#. However, it fails with "Invalid Class". I have confirmed that if I query LOCALHOST then it works fine, but if I query a...
4
by: Jimmy | last post by:
I have a form with a command button on it that is supposed to open up a report and use a query to populate it. DoCmd.OpenReport "rptMailingList", acViewPreview, "qryMailingListChristmas" ...
3
by: russellhq | last post by:
Hi, I'm fairly new to access and have a little trouble with a crosstab query I've setup. I have a main form where the user selects a project name and below in a subform, a crosstab query is...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.