whitespace
Registered User.
- Local time
- Today, 10:10
- Joined
- Aug 30, 2005
- Messages
- 51
Hello all, basically we have had this problem a number of times before, we need to be able to write our own custom function to total queries as in the ones available in query designer (sum, min , max etc.). Basically we need to group a number of years together and for these years calculate trends in the returned data. so we have a table for example:
Year Num1 Num2
2003 25 26
2004 28 24
2005 29 22
And would like to return
Num1 Num2
Up Down
(This would return an upward trend in Num1 and downward trend in Num2). I appreciate that we could create another query with a column for each year but it would be so much nicer to be able to write our own function to be used in the query designer (or SQL whatever) to do this (as we have a lot of Nums to calculate). Is this possible?
(We are happy using VBA etc.)
Many thanks for any help.
Year Num1 Num2
2003 25 26
2004 28 24
2005 29 22
And would like to return
Num1 Num2
Up Down
(This would return an upward trend in Num1 and downward trend in Num2). I appreciate that we could create another query with a column for each year but it would be so much nicer to be able to write our own function to be used in the query designer (or SQL whatever) to do this (as we have a lot of Nums to calculate). Is this possible?
(We are happy using VBA etc.)
Many thanks for any help.