whitespace
Registered User.
- Local time
- Yesterday, 22:41
- Joined
- Aug 30, 2005
- Messages
- 51
Hi..
This has had me and the team stumped for a while. Basically I need to use the excel 'slope' function (and intercept etc.) on a group of values returned in a query.
I have managed to create a function to sort of do this but I want to know if I can create a function in VBA and then use it in a query like an aggregate function - like you can use Sum/Average etc. eg. so i could have..
I have attached the code I have so far if required. Since I need to do this on a lot of different sets of data it would be so much easier if I can just do a normal query and use the Slope function like an aggregate function. Does this make sense?
Thanks so much for any help.
-Jenny
This has had me and the team stumped for a while. Basically I need to use the excel 'slope' function (and intercept etc.) on a group of values returned in a query.
I have managed to create a function to sort of do this but I want to know if I can create a function in VBA and then use it in a query like an aggregate function - like you can use Sum/Average etc. eg. so i could have..
Code:
SELECT SUBJ05.BU_Exam_ID, SUBJ05.BU_Subject_ID, STUD05.Sex, [B]xlslope[/B]([Points_Score],[MeanSAS]) AS Expr1
FROM STUD05 INNER JOIN SUBJ05 ON STUD05.UPN = SUBJ05.UPN
WHERE (((STUD05.MeanSAS) Is Not Null))
GROUP BY SUBJ05.BU_Exam_ID, SUBJ05.BU_Subject_ID, STUD05.Sex;
I have attached the code I have so far if required. Since I need to do this on a lot of different sets of data it would be so much easier if I can just do a normal query and use the Slope function like an aggregate function. Does this make sense?
Thanks so much for any help.
-Jenny