Query Question

S

Steve

When I run the query below, it asks me to enter a parameter value for
Fin_Asst. How do I get it to stop asking for the value?

Below is the query:

SELECT SUM(Fin_Asst.Granted) AS [Sum of County]
FROM Fin_Asst
GROUP BY Fin_Asst;
 
I

Irshad Alam

Try to write the code as below and try :

SELECT SUM([Fin_Asst.Granted]) AS Sum of County
FROM Fin_Asst
GROUP BY SumofCountry.Fin_Asst;


If not correct, post the further error.

Regards.

Irshad
 
S

Steve

After trying this I received the message:

The SELECT statement includes a reserved word or argument name that is
misspelled or missing, or the punctuation is incorrect.

Irshad Alam said:
Try to write the code as below and try :

SELECT SUM([Fin_Asst.Granted]) AS Sum of County
FROM Fin_Asst
GROUP BY SumofCountry.Fin_Asst;


If not correct, post the further error.

Regards.

Irshad




Steve said:
When I run the query below, it asks me to enter a parameter value for
Fin_Asst. How do I get it to stop asking for the value?

Below is the query:

SELECT SUM(Fin_Asst.Granted) AS [Sum of County]
FROM Fin_Asst
GROUP BY Fin_Asst;
 
I

Irshad Alam

ok, Try this :

SELECT SUM([Fin_Asst.Granted]) AS [Sum of County]
FROM Fin_Asst
GROUP BY [SumofCountry.Fin_Asst];

**Note : Pls. check the spelling of your table and Field name again.

Regards
Irshad


Steve said:
After trying this I received the message:

The SELECT statement includes a reserved word or argument name that is
misspelled or missing, or the punctuation is incorrect.

Irshad Alam said:
Try to write the code as below and try :

SELECT SUM([Fin_Asst.Granted]) AS Sum of County
FROM Fin_Asst
GROUP BY SumofCountry.Fin_Asst;


If not correct, post the further error.

Regards.

Irshad




Steve said:
When I run the query below, it asks me to enter a parameter value for
Fin_Asst. How do I get it to stop asking for the value?

Below is the query:

SELECT SUM(Fin_Asst.Granted) AS [Sum of County]
FROM Fin_Asst
GROUP BY Fin_Asst;
 
S

Steve

Spelling and table are correct. This time I get: Invalid bracketing of name
'[Sumof County.Fin_Ast]'.

I have tried different variations of the bracketing with no sucess. I have
even tried redoing spacing on GROUP BY [SumofCounty.Fin_Asst] with no luck.

Query is as follows at present:

SELECT SUM([Fin_Asst.Granted]) AS [Sum of County]
FROM Fin_Asst
GROUP BY [SumofCounty.Fin_Asst];

Thx for giving me assistance in advance.

Irshad Alam said:
ok, Try this :

SELECT SUM([Fin_Asst.Granted]) AS [Sum of County]
FROM Fin_Asst
GROUP BY [SumofCountry.Fin_Asst];

**Note : Pls. check the spelling of your table and Field name again.

Regards
Irshad


Steve said:
After trying this I received the message:

The SELECT statement includes a reserved word or argument name that is
misspelled or missing, or the punctuation is incorrect.

Irshad Alam said:
Try to write the code as below and try :

SELECT SUM([Fin_Asst.Granted]) AS Sum of County
FROM Fin_Asst
GROUP BY SumofCountry.Fin_Asst;


If not correct, post the further error.

Regards.

Irshad




:

When I run the query below, it asks me to enter a parameter value for
Fin_Asst. How do I get it to stop asking for the value?

Below is the query:

SELECT SUM(Fin_Asst.Granted) AS [Sum of County]
FROM Fin_Asst
GROUP BY Fin_Asst;
 
J

John Vinson

When I run the query below, it asks me to enter a parameter value for
Fin_Asst. How do I get it to stop asking for the value?

Below is the query:

SELECT SUM(Fin_Asst.Granted) AS [Sum of County]
FROM Fin_Asst
GROUP BY Fin_Asst;

It sounds like you're trying to group by the name of your *table* -
Fin_Asst - rather than grouping by some field in your table. What is
your intended group level? It needs to be a fieldname, not your table
name.

John W. Vinson[MVP]
 
A

Allan Murphy

The line SELECT SUM([Fin_Asst.Granted]) AS Sum of County should read

SELECT SUM([Fin_Asst.Granted]) AS SumofCountry

NOTE: SUM is a reserved word.

--
Allan Murphy
Email: [email protected]
Steve said:
After trying this I received the message:

The SELECT statement includes a reserved word or argument name that is
misspelled or missing, or the punctuation is incorrect.

Irshad Alam said:
Try to write the code as below and try :

SELECT SUM([Fin_Asst.Granted]) AS Sum of County
FROM Fin_Asst
GROUP BY SumofCountry.Fin_Asst;


If not correct, post the further error.

Regards.

Irshad




Steve said:
When I run the query below, it asks me to enter a parameter value for
Fin_Asst. How do I get it to stop asking for the value?

Below is the query:

SELECT SUM(Fin_Asst.Granted) AS [Sum of County]
FROM Fin_Asst
GROUP BY Fin_Asst;
 
Top