-
Here are some samples on how to use cursors in SQL to do updates and deletes on records. Nothing fancy, just pure t-sql code. :) Updating of Records Sample [code language="T-SQL"] --EXAMPLE ONE SET NOCOUNT ON Declare @AccountNumber varchar(20) DECLARE AccountNumbers CURSOR FOR ( select AccountNumber...
-
Wouldn't it be nice if you have a mechanism to notify users that are connected to your SQL Server? Here's a stored procedure that an help you do that task. CREATE PROC spSendNetworkNotification @Message VARCHAR (200) AS BEGIN SET NOCOUNT ON DECLARE @ShellCommand VARCHAR (350) DECLARE @MessageSource...
-
The guys from Gudu software has just released an application that generates well-formated sql statements for use on applications. This tool can format your sql statements to any language. The program supports C#, VB/VB.NET, ASP, Java and Delphi. It even utilizes the StringBuilder object if its available...
-
This is an interesting piece of sql, the function accepts a string and removes HTML elements that is inside the string. This is genereally useful when you have data that has embedded HTML content on it. The function was written by Robert Davis . /****** Object: User Defined Function dbo.fnStripTags Script...
-
XPSMTP is the easiest and fastest way to send e-mails in SQL Server. Its is so easy to use. All you need to do is download the DLL to the BINN directory of your SQL Server. Register the XP stored procedure and Grant permission to the stored procedure. XSMTP even supports MSDE. Best of all, IT'S ABSOLUTELY...