By using this website, you agree to our Terms of Use (click here)
Notifications
Clear all
March 18, 2020 9:35 am
For those who like using the technique to turn a SQL View into a Data Access Class (DAC) outlined in this article by Doug Johnson:
https://www.acumatica.com/blog/technical-tuesday-report-from-sql-view/
You'll want to add a statement before CREATE VIEW that drops the SQL View if it exists, otherwise you'll get an error that it already exists the next time you try to publish the Customization Project.
IF EXISTS
(
SELECT * FROM sys.views
WHERE name = 'MySQLView' AND schema_id = SCHEMA_ID('dbo')
)
DROP VIEW [dbo].[MySQLView]
GO
CREATE VIEW [dbo].[MySQLView] AS
1 Reply
March 31, 2020 10:03 am
MS SQL 2016+ and MySQL have this is well:
DROP VIEW IF EXISTS [dbo].[MySQLView]
GO
CREATE VIEW [dbo].[MySQLView] AS
...
