 create procedure [{databaseOwner}].[{objectQualifier}group_list](@BoardID int,@GroupID int=null) as
 begin
 		if @GroupID is null
-		select * from [{databaseOwner}].[{objectQualifier}Group] where BoardID=@BoardID
+		select * from [{databaseOwner}].[{objectQualifier}Group] where BoardID=@BoardID order by SortOrder 
 	else
 		select * from [{databaseOwner}].[{objectQualifier}Group] where BoardID=@BoardID and GroupID=@GroupID
 end

		where
			a.BoardID=@BoardID
		order by
			a.MinPosts,
			a.Name
	else
		select

			ELSE '%' END 
    ORDER BY 	
	 (case 
        when @SortName = 2 then a.[Name] end) DESC,
		(case 
        when @SortName = 1 then a.[Name] end) ASC, 
		(case 
        when @SortRank = 2 then a.RankID end) DESC,
		(case 
