correct script so it wont create duplicate groups, will check for existing prior to creating and only create if it doesnt exist.

#95
This commit is contained in:
Chris.Watts90@outlook.com 2018-06-06 10:50:47 +01:00
parent 72e98bdd2e
commit 7552390bec

View File

@ -1 +1,3 @@
insert into GroupDb values ((select max(groupId) from GroupDb)+1,'Archived',0) insert into GroupDb(GroupId, GroupName, AssignedUserCount)
select (select max(GroupId) from GroupDb)+1, 'Archived', 0
WHERE NOT EXISTS(select * from GroupDb where GroupName='Archived');