M
Mitchell_Collen
Can a group by clause be used with an input parmeter?
select count(field1),field3
from Table
Group by field1, @field3 <--user inputs what field
I want the user to be able to decide on specific field group by clause. The
count will be on the same field everytime however, instead of making 6
functions, I thought I could make only one and have the user select from a
list of different groupings. If I am not making sense let me know. I know
this is a kind of weird situation.
If you have done this before will you tell me what you did. I have considered
a macro but I do not know if this will cause lagging everytime the macro runs.
Also, I have never done this with a macro. Any suggestions or brainstorming
ideas about this is greatly appreciated.
Thanks in advance. -MC
select count(field1),field3
from Table
Group by field1, @field3 <--user inputs what field
I want the user to be able to decide on specific field group by clause. The
count will be on the same field everytime however, instead of making 6
functions, I thought I could make only one and have the user select from a
list of different groupings. If I am not making sense let me know. I know
this is a kind of weird situation.
If you have done this before will you tell me what you did. I have considered
a macro but I do not know if this will cause lagging everytime the macro runs.
Also, I have never done this with a macro. Any suggestions or brainstorming
ideas about this is greatly appreciated.
Thanks in advance. -MC