delete "group"
Hi
How do I remove/delete an non active group?
Thanks
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Anton Gogolev on 23 Oct, 2017 11:11 AM
Felix,
Currently, there's no way to delete a Group short of deleting it directly
from within Microsoft SQL Server Management Studio.
2 Posted by felix.nielsen on 23 Oct, 2017 11:16 AM
Ok :( - can you send med a TSQL to remove the group? - I guess the table "group" is not enough? - there is no permissions or projects assigned
Felix
Support Staff 3 Posted by Anton Gogolev on 23 Oct, 2017 11:29 AM
Felix,
It goes as follows:
begin tran
delete from [Group] where Name = 'YOUR-GROUP-NAME-HERE'
rollback tran
You can double-check that everything is fine and then replace "rollback"
with "commit" and re-run the script.
4 Posted by felix.nielsen on 23 Oct, 2017 11:35 AM
ok thanks - but I see there is a reference in GroupPermissionJunction also?
Support Staff 5 Posted by Anton Gogolev on 23 Oct, 2017 11:57 AM
Felix,
There could very well be. In this case,
declare @name nvarchar(200) = 'YOUR-GROUP-NAME-HERE'
begin tran
delete g from [Group] g inner join GroupPermissionJunction gpj on
gpj.GroupID = g.ID and g.Name = @name
delete from [Group] where Name = @name
rollback tran
6 Posted by felix.nielsen on 23 Oct, 2017 12:04 PM
thx will try it