Google Analytics Alternative

Search This Blog

Friday, July 30, 2010

Difference between Stuff and Replace

What is STUFF and Replace. Differece between them.

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.

Syntax :
STUFF (character_expression , start , length ,character_expression )
Usage in Real life Example :
SELECT STUFF('abcdef', 2, 3, 'ijklmn');
Output ::
(1 row(s) affected)
Command Highlights :

Automate the Generation of Stored Procedures for Your Database

Level of Difficulty 1 2 3
Design-time automation makes coding faster and ensures that all the procedures generated use the same naming conventions and structure. In an effort to improve their coding efficiency in a large SQL project, the authors wrote a set of design-time stored procedures that generate run-time stored procedures, and have used them in project after project ever since. Recently, the authors updated their procedures to make use of SQL Server 2000 features, including user-defined functions.