Skip to main content
Completed

if exists Alter procedure on functionality execute

Related products:Software Factory
  • November 27, 2019
  • 8 replies
  • 139 views

During development (especially during the user test) you sometimes have to make quick changes to functionality. However executing the code from the functionality - result screen will do a drop and create, messing up any rights set to the procedure. It would be very helpful if instead the code did a if exists alter , if not exists create. Since this is probably not wanted since some people use the result screen to edit their code I would also be happy if there was a second button (generate as alter procedure). This way any rights set to the object will remain intact. This would save a lot of time during user tests and would decrease the change of errors due to overwriting the current procedure. 

Jasper
Superhero
  • January 16, 2020

Our preference would be to use the CREATE OR ALTER statement, but that would mean that we only support SQL Server 2016 and higher. However, we will probably drop support for SQL Server 2014 later this year.

Regarding the object rights: this will no longer be a problem if the Indicium service tier is used for the Windows user interface, since all connections to the database are then made using the pool user.


Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+5

Yes, create or replace / create or alter is the way to go!


Mark Jongeling
Administrator
Forum|alt.badge.img+23
Updated idea statusOpenOn the backlog

Mark Jongeling
Administrator
Forum|alt.badge.img+23
The following idea has been merged into this idea:
https://community.thinkwisesoftware.com/ideas/make-use-of-create-or-alter-3166
All the votes have been transferred into this idea.

Mark Jongeling
Administrator
Forum|alt.badge.img+23
On the backlogWorking on it!

Mark Jongeling
Administrator
Forum|alt.badge.img+23
Working on it!Next release

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi all,

From the next version (2023.1) of the platform, SQL Server will utilize CREATE OR ALTER. This will keep rights on existing objects present. We'll also make use of similar functionality for DB2 and Oracle so we all benefit 😄


Jeroen van den Belt
Administrator
Forum|alt.badge.img+9
Next releaseCompleted


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings