Group by Query plus Static Value

  • Thread starter Thread starter finster26
  • Start date Start date
F

finster26

I have created a query that uses "Group By". It gives me
three values. Once I have the three values, I would like
to add another value statically for use in a Combo Box.
This added value is not part of the data being queried. I
do not what to add this value to the data. Is it possible?

Query Results(Group By) + Value = Combo Box values

Bob
 
Why not add the value into a calculated column that you are doing the group by on.

For instance,

SELECT SomeField & " - Raisins"
FROM SomeTable
GROUP BY SomeField & " - Raisins"

So if SomeField contained 1, 2, and 3 in three records you would get
1 - Raisins
2 - Raisins
3 - Raisins
returned as the results.
 
Actually, using you example, I want add a "4" to the end
list. So after the query I get:
1
2
3
then I want to add a 4 to the list.
1
2
3
4

thanks.
 
So, now I understand a bit better. You would need to use a UNION query to do
this. Since I don't have you original query I can only give a generic example.

SELECT SomeField
FROM SomeTable
GROUP BY SomeField
UNION
SELECT 4
FROM SomeTable

You can only create union queries in the SQL view.
 
Back
Top