Scripts

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

759 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,271 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,100 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

602 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,577 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

Technical Article

Search for a value in a numeric variable list

When you have a variable that hold a comma separated numbers like '1,2,3' and you have a table with a column that has the value that should match a number in that list, you can use this script to avoid building a string and then executing it.You have to convert the columnID to varchar, the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-05-20

406 reads

Blogs

Car Update September 2026

By

Software is hard. While I love our Lucid Gravity, I realize that they are...

Microsoft Tools for Making Data AI-Ready

By

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

Local Models Using GPUs with Ollama

By

Can you use your GPUs when running a local model under Ollama? You can,...

Read the latest Blogs

Forums

Alamat BCA KCP Bursa Efek Jakarta Tlp:0821°7555°651

By layanan_Bca88

Tlp/Wa 62 8217555651 Gd. Bursa Efek Jakarta, Jl. Jend. Sudirman kav 52-53 Tower II...

Alamat BCA KCP WTC Sudirman Telp:0821.8200.233

By m4rt1n4

Telp/Wa 62 8218200233 World Trade Center I, Jl. Jenderal Sudirman No.Kav. 29, RT.8/RW.3, Kuningan,...

BCA KCP Sampoerna Strategic Square Telp:08218200203

By R4nt4u

Telp/Wa 62 8218200203 Gd. Sampoerna Strategic Square, Jl. Jenderal Sudirman Tower A - Ground...

Visit the forum

Question of the Day

Reserved Words I

Which of these are not reserved words?

See possible answers