Here's a stored procedure version of udf_CharIndex for SQL Server 7.
DECLARE @iPos INT
DECLARE @nRet INT
EXECUTE @nRet = sp_CharIndex 'W', 'Hello World', @nPos = @iPos OUTPUT
IF @iPos > 0
Print 'not found'
--Only uses on character.
Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time. Use an SMTP mail […]