Scripts

Technical Article

Finding first/last day of month by a date

This script finds the first day of previous, current and next month as well as last day of previous, current and next month.The calculation is based on the ISO date format which makes it independant of the date format used on the SQL Server.The calculation is performed from a date - it can be altered […]

You rated this post out of 5. Change rating

2004-12-02 (first published: )

230 reads

Technical Article

Script to List Missing Identity Numbers

I have a table named employees with an identity column named id. Also,last_name is a column in the table named employees. I created the employeestable and inserted 9 rows in it. If I do a select * from employees, theoutput looks like this:id last_name1 a2 b3 c4 d5 e6 f7 g8 h9 iThen I deleted […]

You rated this post out of 5. Change rating

2004-11-29 (first published: )

141 reads

Technical Article

Find and REMOVE string from stored procedures

This script extends the "Find strings in text of stored procedures" Script by LiviuB and and now finds thestring and removes it. You may modify script to just comment out the text.This script removes the text (in this case 'set dateformat dmy') from all non-system stored procedures in a database.Modify the variable @searchstring to contain […]

You rated this post out of 5. Change rating

2004-11-26 (first published: )

278 reads

Technical Article

Easy and Fast way to check Backup details

Easy and Fast way to check Backup details. One line query to check backup status for all the databases. No need to go to each database or schedule job. Even you can use this query in customized application to get all the details on a single screen.

5 (1)

You rated this post out of 5. Change rating

2004-11-25 (first published: )

730 reads

Technical Article

Get Table Sizes and Percent of Database Size

This script uses two undocumented stored procedures that retrieve all tables in the database in which it is run and lists the data and index sizes, the sum of these sizes, and the table's size percentage of the entire database. The results are presented in descending order of the sum of the data and index […]

5 (1)

You rated this post out of 5. Change rating

2004-11-24 (first published: )

2,329 reads

Technical Article

A different Weekdays Between test

Recently, I answered a question by a person on Experts Exchange.com on how to find the # of weekdays between two dates. This question was simplified greatly by the fact that the dates given would always be from Monday to Friday, and so the calculations needed were very simple.Then, while looking at the recent scripts […]

You rated this post out of 5. Change rating

2004-11-22 (first published: )

124 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Read the latest Blogs

Forums

Writer methods in PowerQuery (LOL)

By pietlinden

I'm using PowerQuery in Excel on my desktop. (Yeah, I know you can do...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers