If that's the case, there is a small possibility that some user on some occasions, may get an error where an invalid table or view (view in this case) is referenced in an SQL query, if that query happens to be executed in that fraction of a second that it takes between dropping the old view and creating that new one.
Good point about not all databases supporting Create or Replace. I think the earlier versions of MS-SQL didn't. But I'm pretty sure the new ones do - but then again I have rarely had the opportunity to work with MS-SQL in the past so do not recall this to be true with 100% certainty.. I think if all databases do support create or replace, then a better algorithm would be to use create or replace, and some logic in place to check if the view name was changed by way of rename of a form, and if so, second step to delete the redundant invalid view.. Joe -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[email protected]]on Behalf Of Grooms, Frederick W Sent: Monday, February 22, 2010 3:33 PM To: [email protected] Subject: Re: Remedy View Validation Actually Drops and Creates do not require Commits as they are DDL type transactions. I have had the problem where I did a copy/paste from a display only field and changed it to a actual field (with different ID). For some reason it did not save the actual field column to the db and the db view did not get created. The reason(s) they probably do not use the Create or Replace format for views are: 1. The rename of a form 2. I don't know if all databases supported allow the Create or Replace command. Fred -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[email protected]] On Behalf Of Joe D'Souza Sent: Monday, February 22, 2010 2:18 PM To: [email protected] Subject: Re: Remedy View Validation W.R.T. costs, not a shred of difference.. Since the commit happens after the creating the new view, and not immediately after the drop, I would assume the old view is still valid, until the commit after which the new view becomes active?? Create or Replace would only perhaps save the need for dropping it? But Remedy probably doesn't prefer that because of the possibility of an actual form rename, in which case a drop would be necessary before creating a new one.. Joe -----Original Message----- From: Action Request System discussion list(ARSList) [mailto:[email protected]]on Behalf Of Rick Cook Sent: Monday, February 22, 2010 3:07 PM To: [email protected] Subject: Re: Remedy View Validation Ok, so it drops and recreates views. Is that really a bad thing? Rick _______________________________________________________________________________ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

