HOWTO: Generate a Random String of Characters in SQL
Here's a stored procedure to generate a string of random characters. This is useful when, for example, one needs to generate a random password. Please excuse the poor formatting, I am working on finding and implementing a decent code formatted for both SQL and C#. Thanks to Raymond Lewallen over at CodeBetter.com SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: Raymond Lewallen -- http://codebetter.com/blogs/raymond.lewallen/archive/2005/05/17/63281.aspx -- Create date: 2005/05/16 -- Description: Generate a random string of -- given length. --...