I am getting "errors" when creating a view from a P-SQL Query that executes just without any error when executing without creating a view from it. I think the errors might have to do with a COALESCE.
The View was created but my WHERE clause was removed and I get "errors" when I try to edit the P-SQL statement
Here is the Coalesce statement:
YEAR(COALESCE (date1, date2)) AS MYear
The purpose of this view is to provide a YTD Summary using the SUM function in the SELECT. Therefore there is also a Group By in the query.
The actual P-SQL Query is rather large and has confidential information so I can't post it. I know this makes solving this issue more difficult but I am stuck with not being able to post the actual query.
I guess the initial question is can a CREATE VIEW handle a COALESCE, SUM and GROUP BY?
For those not familiar with P-SQL it is like MS-SQL as far as syntax goes.