If Exists (Select * From sysobjects Where name = N'lw_getActivityTypes' And user_name(uid) = N'dbo')
Drop Procedure dbo.lw_getActivityTypes
Go
CREATE Procedure lw_getActivityTypes (
@groupId int
)
AS
set nocount on
select distinct at.activityTypeId,at.name from activityType as [at]
join activity a on at.activityTypeId=a.activityTypeId
where a.groupId=@groupId order by at.name
return
Go