psycoperl
Active Member
- Joined
- Oct 23, 2007
- Messages
- 338
- Office Version
- 365
- 2016
- Platform
- Windows
- MacOS
- Web
Good Evening,
I am working on a query that i will be using for exporting data from my database to be used in an external system. I have a function that I am calling in my query CalculateRelease() which takes the latest date in the Periods Column and adds a fixed number. Since there are 4000+ records in my query, it is calculating the value on each record it is running the same function and returning the exact same value on ALL the records, i was wondering if there was a way to have the value calculated once and just put into every row, saving long calculation periods.
thanks
I am working on a query that i will be using for exporting data from my database to be used in an external system. I have a function that I am calling in my query CalculateRelease() which takes the latest date in the Periods Column and adds a fixed number. Since there are 4000+ records in my query, it is calculating the value on each record it is running the same function and returning the exact same value on ALL the records, i was wondering if there was a way to have the value calculated once and just put into every row, saving long calculation periods.
Code:
SELECT DISTINCT CourseNumberWithCrosslist AS [School Course Number], [Course Name],
[Instructor ID], [Start Date], [End Date], CalculateRelease("Stu") AS [Release Date]
FROM _tblRegistrationInfo_SR00034 ;
thanks