Scripts

Technical Article

Sending mail using CDONTS and Sql Server

This stored procedure can be used to send mail through CDONTS and SQL Server. It resides in the Master database and accepts email addresses and subjects with a maximum of 50 characters and a body with a maximum of 500 characters. (You can increase or decrease these according to your requirements.) For this stored procedure […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(3)

You rated this post out of 5. Change rating

2002-06-03

2,213 reads

Technical Article

Modified SP_who

Here is a modified SP_WHO procedurewhich returns more information about the current session.I forgot all the thing that i have added to the sproc, but the last addition shows the last executed TSQL statement.There might be a better solution to get the values from DBCC rowset, thou I did not have time to think everything […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-28

763 reads

Technical Article

Attach Excel Workbook

After installing bellow procedure you will be able to easly attach workbook and read data from it.This example shows how to attach excel file (c:\temp\orders.xls) and display data from named range (Table1):Exec mysp_AttachWorkbook 'c:\temp\orders.xls', 'MyOrders'Select * from MyOrders...Table1

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-25

2,273 reads

Technical Article

Eliminate Duplicates

This will find and delete all duplicate rows. You can refine the granularity of uniqueness by including more columns than just the Primary Key. If you are picky about which rows you want to delete, don't use this. Instead use the 'Find Duplicates' script I just submitted and then delete manually.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-24

1,101 reads

Technical Article

Find Duplicates

Find duplicates in any table, and report the number of duplicates. Enter in the table name, and the field or fieldsfor which there should only be one row for each of that field, but you suspect are more. For example, if an employee table has more than one record for an employeethis will find any […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2002-05-24

603 reads

Technical Article

TableCounts

This script generates a statement that you would then run in the user database to get rowcounts of all tables. The advantages of this approach are you can modify it to get just the tables you want, and the output is easy to read:Table1-------1069Table2------10427

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-24

437 reads

Technical Article

Monitor Object Changes

Based on post http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=4349 I decided to write this script which will check for object changes in all databases and send an email listing the objects changed to the Operator associated with the job. This by no means offsets the need to restrict change access to objects in production, but in those cases when you […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-23

1,580 reads

Technical Article

Script to sort by columns that may include NULLs

If you sort by in ASC order by column that may include NULLs and empty strings ( if type is varchar), the records with nulls will always appear before any others.This script will show how to chagne this pattern and move all records with NULLs to the bottom of your recordset

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-23

254 reads

Blogs

Prep data for AI vs. Fabric Data Agent Instructions: What Goes Where?

By

Making Data AI-Ready, Part 3 (This is the final article in a three-part series...

Keeping Track of my ConEmu CLIs

By

I use ConEmu for my terminal interface. I’m still on Windows 10 at home,...

10 Decisions to Make Before You Create A Fabric Workspace

By

Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...

Read the latest Blogs

Forums

A design question in a parent child relationship

By eichnerm

I am not sure which is the best way to proceed. I have parent...

Hyperscale Replicas III

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Hyperscale Replicas III

Development Is Fun

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Development Is Fun

Visit the forum

Question of the Day

Hyperscale Replicas III

In an Azure SQL Database Hyperscale Edition, how many named replicas can be configured?

See possible answers