Free User-Defined string Functions Transact-SQL

  • http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,54,33,27115

    Description

    GETWORDCOUNT() Counts the words in a string

    GETWORDNUM()   Returns a specified word from a string

    AT()  Returns the beginning numeric position of the first occurrence of a character expression within

          another character expression, counting from the leftmost character

    RAT() Returns the numeric position of the last (rightmost) occurrence of a character string within

          another character string

    OCCURS() Returns the number of times a character expression occurs within another character expression

    PADL()   Returns a string from an expression, padded with spaces or characters to a specified length on the left side

    PADR()   Returns a string from an expression, padded with spaces or characters to a specified length on the right side

    PADC()   Returns a string from an expression, padded with spaces or characters to a specified length on the both sides

    PROPER() Returns from a character expression a string capitalized as appropriate for proper names

    RCHARINDEX() Is similar to a built-in function Transact-SQL charindex but the search of which is on the right

    For more information about string UDFs Transact-SQL please visit the

    http://www.universalthread.com/wconnect/wc.dll?LevelExtreme~2,54,33,27115

  • Hello Igor,

    Thank you for offerring something free to the community.  The UDFs sound like useful utilities.  Can the source be posted to the scripts area of this site?

    Wayne

  • Thanks. They are really useful.

  • Hi !

    Thanks a lot Wayne Lawton and sliu .

    I have tried to place the source to the scripts area of this site, the message has appeared:"To the best of your knowledge, this script will not harm other systems and is bug free. SQLServerCentral.com is not responsible for the usage of your script. By submitting the script, you freely allow SQLServerCentral.com to retain a non-exclusive copyright on the script and you still retain ownership of the script to submit it elsewhere. Your script will be placed into a queue and will be posted usually within 48 hours. Not all scripts are accepted (usually due to problems with execution of the script). "

    With best personal regards, Igor.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply