tag:support.hglabhq.com,2012-10-18:/discussions/problems/1198-delete-groupHgLab: Discussion 2017-10-23T12:04:11Ztag:support.hglabhq.com,2012-10-18:Comment/438363662017-10-23T11:11:13Z2017-10-23T11:11:13Zdelete "group"<div><p>Felix,</p>
<p>Currently, there's no way to delete a Group short of deleting it directly<br>
from within Microsoft SQL Server Management Studio.</p></div>Anton Gogolevtag:support.hglabhq.com,2012-10-18:Comment/438363662017-10-23T11:16:41Z2017-10-23T11:16:41Zdelete "group"<div><p>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</p>
<p>Felix</p></div>felix.nielsentag:support.hglabhq.com,2012-10-18:Comment/438363662017-10-23T11:29:53Z2017-10-23T11:29:53Zdelete "group"<div><p>Felix,</p>
<p>It goes as follows:</p>
<p>begin tran<br>
delete from [Group] where Name = 'YOUR-GROUP-NAME-HERE'<br>
rollback tran</p>
<p>You can double-check that everything is fine and then replace "rollback"<br>
with "commit" and re-run the script.</p></div>Anton Gogolevtag:support.hglabhq.com,2012-10-18:Comment/438363662017-10-23T11:35:56Z2017-10-23T11:35:56Zdelete "group"<div><p>ok thanks - but I see there is a reference in GroupPermissionJunction also?</p></div>felix.nielsentag:support.hglabhq.com,2012-10-18:Comment/438363662017-10-23T11:57:28Z2017-10-23T11:57:28Zdelete "group"<div><p>Felix,</p>
<p>There could very well be. In this case,</p>
<p>declare @name nvarchar(200) = 'YOUR-GROUP-NAME-HERE'</p>
<p>begin tran<br>
delete g from [Group] g inner join GroupPermissionJunction gpj on<br>
gpj.GroupID = g.ID and g.Name = @name<br>
delete from [Group] where Name = @name<br>
rollback tran</p></div>Anton Gogolevtag:support.hglabhq.com,2012-10-18:Comment/438363662017-10-23T12:04:10Z2017-10-23T12:04:10Zdelete "group"<div><p>thx will try it</p></div>felix.nielsen