Oracle workaround to the STUFF() MSSQL Function?

From: Jeff Lambert <jeffl_at_hypershell.com>
Date: 19 Dec 2003 15:31:36 -0800
Message-ID: <f17e7766.0312191531.3d3702d0_at_posting.google.com>


I have this function everywhere in our SQL server 2000 stored procedures. Has anyone written a workaround function for it? I would appreciate if you could share. As you can imagine, searching the groups for "stuff" returns a lot of, well... stuff. But not what I'm looking for!

Using STUFF
The STUFF function inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position.

If the start position or the length is negative, or if the starting position is larger than length of the first string, a null string is returned. If the length to delete is longer than the first string, it is deleted to the first character in the first string.

This example puts in the character string of "xyz" starting at the second character of the "abc" character expression, and replaces a total of three characters.

SELECT STUFF('abc', 2, 3, 'xyz')   

Here is the result set:


axyz   

(1 row(s) affected) Received on Sat Dec 20 2003 - 00:31:36 CET

Original text of this message