Forum Discussion
Peter62270
Dec 07, 2021Copper Contributor
LAG function
Hello, I do have a problem using the LAG function in a View. I use: LAG(Process_Time,1) OVER (ORDER BY Process_Time) Problem is: As soon as I hit the retutn button it delets "OVER (ORDER BY Pro...
olafhelper
Dec 07, 2021Bronze Contributor
Peter62270 , by "hitting return button" I guess you use a view design wizard?
The wizards are know for been not reliable and that they don't alway support new SQL features.
Install the lates SSMS version or better use always plain script to create objects.
Peter62270
Dec 07, 2021Copper Contributor
Hi Olafhelper,
thanks for your advice. If entered directly as text it works but it is rather slow. I am using Access as a front end I may as well run this table through a little program code and calculate the time diffference, probably it is quicker this way. I will try and compare.
However, your advice was good. Thanks.
Regards
Peter
- olafhelperDec 08, 2021Bronze Contributor
Peter62270 , in MS Access you can use "Pass-Through" queries to pass it directly to SQL Server instead that Access process the query.