lw_addGroup.sql
If Exists (Select * From sysobjects Where name = N'lw_addGroup' And user_name(uid) = N'dbo')
Drop Procedure dbo.lw_addGroup
Go
CREATE Procedure lw_addGroup(
@locationId int,
@name nvarchar(20),
@description nvarchar(50),
@beginDate datetime,
@endDate datetime,
@beginTime datetime,
@endTime datetime,
@gradeScaleId1 int,
@gradeScaleId2 int,
@period tinyint,
@maxSize tinyint,
@meetingDays nvarchar(7),
@groupId int output
)
As
set nocount on
insert into [group] values(@locationId,@name,@description,@beginDate,
@endDate,@beginTime,@endTime,@gradeScaleId1,@gradeScaleId2,
@period,@maxSize,0,@meetingDays)
select @groupId= @@IDENTITY
return @@ERROR
Go