If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Those functions cannot be used in a WHERE clause, hence the SQL error being thrown when you attempt to use it in that manner. We will adjust this in the next build to prevent attempting to search on such columns.
If you really need to filter on a LAG or LEAD column, you could put your SQL statement into a CTE (WITH clause) and then do your SELECT from that.
Comment