Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Puzzled... 1

Status
Not open for further replies.

cariengon

Technical User
Mar 18, 2002
283
US
I have a query that has several equations in it. The query works fine. I saved that query as a new name because I needed to do a sort order different and didn't want to affect the original query. Now when I run this new query it asks me for a parameter of one of the field's calculations. I'm puzzled as to why it would do this in this second query when everything is the same other than the sort order...

Anyone else come across this?
 
An addition. I discovered that this happens because I put a sort order on the field that has the calculation. The answer is the same if I just say "OK" to the parameter without entering anything. The issue that I have is that I don't want this happening when a different user runs this query...
 
If you use the alias in the statement like this:

SELECT CUSTOMERID, SUM(AMOUNT) As CUSTOMERTOTAL FROM TABLENAME ORDER BY CUSTOMERTOTAL

you'll get the prompt

if however, you use the formula again, you won't get the parameter prompt:

SELECT CUSTOMERID, SUM(AMOUNT) As CUSTOMERTOTAL FROM TABLENAME GROUP BY CUSTOMER ID ORDER BY SUM(AMOUNT)

Leslie
 
Thanks!!! Figured that one out... Kinda a pain... :)

Carie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top