Stored Procedure Icon dbo.forums_GetUsersByFirstCharacter

Stored Procedure Properties

Name Value
Owner dbo
Created 2004-05-31
Startup False
Encrypted False

Creation Options

Name Value
QUOTED_IDENTIFIER OFF
ANSI_NULLS OFF

Parameters

Name DataType Length Type
@FirstLetter char 1 INPUT

Total: 1 parameter(s)

SQL

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO





CREATE    PROCEDURE forums_GetUsersByFirstCharacter
(
	@FirstLetter	char(1)
)
 AS
	--- get a list of UNBANNED users whose username begins with @FirstChar
	SELECT
		Username,
		Password,
		Email,
		ForumView,
		Approved,
		ProfileApproved,
		Trusted,
		FakeEmail,
		URL,
		Signature,
		DateCreated,
		TrackYourPosts,
		LastLogin,
		LastActivity,
		TimeZone,
		Location,
		Occupation,
		Interests,
		MSN,
		Yahoo,
		AIM,
		ICQ,
		TotalPosts,
		HasAvatar,
		ShowUnreadTopicsOnly,
		Style,
		AvatarType,
		AvatarUrl,
		ShowAvatar,
		DateFormat,
		PostViewOrder,
		FlatView,
		IsModerator = (SELECT Count(*) FROM Moderators WHERE Username = U.Username),
		Attributes
	FROM  
		Users U(nolock)
	WHERE 
		LEFT(UserName, 1) = @FirstLetter

















GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO


					

Generated on 26/08/2004 15:05:32 by DataAide.