Scripts

Technical Article

Function to return the SQL Version Number

This function returns the SQL Build Number as an int. i.e. 7, 8, or 9. @@Version is great, but super long, and the formatting of the string has changed over the years. This helps me find out what version of SQL I'm working on in a quick and efficient manner. The script includes the drop […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-08-08 (first published: )

1,305 reads

Technical Article

Bulk Insert WMIC output to table w/ xp_cmdshell

This is an example of retrieving WMIC results using the xp_cmdshell proc, and inserting the results into a table.Specifically, this script retrieves disk info from the LogicalDisk class, but WMIC provides thousands of other properties. WMIC does require it be ran from a Windows 2003 server, but can query other Windows 2000 servers when executed […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2006-08-04 (first published: )

832 reads

Technical Article

UDF to return Years, Months & Days between 2 dates

There are two UDF's included here.The first one will return the number of Years, Months and Days between a Start and End date.The second one will return either Years, Months or Days which makes it much easier to include in a select.If you know of or find a better/faster way to do this, then please […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-08-01 (first published: )

186 reads

Technical Article

Handle Divide by Zero in SQL Reporting Services

Out of the box, Reporting services does not handle divide by zero conditions gracefully. There are plenty of posting on how to use the IIF() function to accomplish this, with some rather horrific looking code. In order to simplify the coding process and make the resulting expressions readable by a mere mortal, I wrote the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(14)

You rated this post out of 5. Change rating

2006-07-28 (first published: )

4,031 reads

Technical Article

Alphanumeric and Special Character Validation- New

Alphanumeric and Special Character Validation=========================================/*Function name: fn_ValidateStringDescription : This function is used to validate whether the given string contains Alphanumeric character and some special character’s ‘@’ ,’(‘, ‘ )’, ‘_’, ‘-‘Parameters: 1) @InputString varchar(25) Accepts the string, which we need to validate 2) @Type int = 0 validate the string for only alphanumeric characters i.e […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-07-26 (first published: )

1,683 reads

Technical Article

usp_get_all_stats_date

This script gathers stats_date and index information for all of the current database. Please feel free to modify it as it is made up of components that are available on this site here- http://www.sqlservercentral.com/scripts/contributions/97.aspand a BOL entry for stats_date.I needed this information and thought I would share it.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-07-17 (first published: )

579 reads

Technical Article

Metadata Reportserver

This stored procedure gives you metadata information from the reportserver database about published reports, datasources, directories,authorized users/groups,(shared)schedules and subscriptions.I integrated this stored procedure in a report in our MS report services environment for auditing purposes

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-07-14 (first published: )

461 reads

Blogs

The Book of Redgate:A Prehistory

By

I’ve covered the values in a number of previous posts on the Book of...

Evidence-bound: what AgentDBA will and won’t link

By

When the evidence names the database, it says so. When it doesn’t, it stops....

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...

Read the latest Blogs

Forums

Alamat BCA KCP Atrium Telp:08218520154

By layanan_Bca88

WhatsApp CS 628218520154 Ruko Atrium Blok E. 12-13, RT.5/RW.18, Sunter Agung, Kec. Tj. Priok,...

Alamat BCA KCP Bungur Telp:08218520154

By R4nt4u

WhatsApp CS 628218520154 Jl. Bungur Besar Raya No.32 & 32A, RT.3/RW.1, Gn. Sahari Sel.,...

Alamat BCA KCP Cempaka Putih Raya Telp:08218520154

By m4rt1n4

WhatsApp CS 628218520154 Jl. Cempaka Putih Raya No.118 B,C,D, RT.16/RW.3, Cemp. Putih Tim., Kec....

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