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.33 (3)

You rated this post out of 5. Change rating

2002-06-03

2,141 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

704 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,230 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,087 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 […]

5 (1)

You rated this post out of 5. Change rating

2002-05-24

578 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

412 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,538 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

209 reads

Blogs

Microsoft Releases Windows 11 ARM ISO – A Game Changer for ARM-Powered Devices

By

Yesterday, Microsoft released the highly anticipated Windows 11 ARM ISO image, marking a major...

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Master the Foundational Basics

By

It tells us to take the time to master the foundational basics of whatever...

Read the latest Blogs

Forums

Linking 2 SQL Databases

By SimonLM

Hi All I am a complete novice so I apologise for any incorrect terminology....

How to write this query?

By water490

Hi everyone I have two tables storing stock prices.  Each table comes from a...

ssrs order of operation question

By stan

hi i need "sample size" in my report's 4th data region which is a...

Visit the forum

Question of the Day

The Hash Join I

What are the two inputs called to a hash join operation in SQL Server? (choose 2)

See possible answers