Scripts

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: )

830 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: )

185 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,028 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,681 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: )

575 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: )

457 reads

Technical Article

Retreiving all the Table Information from SQL

The Query will enable you to retrieve all the Tables in the Database .The Output of the Query will list all the User Tables along with the Column Names and the Sort order of the Columns .The Query will also return as to whether the Columns in the table are with allow null option or […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2006-07-06 (first published: )

469 reads

Blogs

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

Don’t Fear the Technology

By

The concern that a particular technology is going to destroy the world seems to...

Read the latest Blogs

Forums

Moving Beyond the Reboot: Finding the Culprit Behind Memory Pressure

By Pablo Echeverria

Comments posted to this topic are about the item Moving Beyond the Reboot: Finding...

Reserved Words I

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Reserved Words I

Get Along

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Get Along

Visit the forum

Question of the Day

Reserved Words I

Which of these are not reserved words?

See possible answers