Scripts

Technical Article

DTS-Less and Jobless Approach to Table Freshness

How about getting the data when the table data is first queried?  The following script checks to see if the specified table (@MyTable) has been updated today.  If so, just return the data found.  If not, then get the data from a "fresher source".  Great for ASP that performs table reporting and needs "baked daily" […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-04-23

1,579 reads

Technical Article

Generate Delete Stored Procedure

This procedure will generate a delete stored procedure against a provided table and column name in your database.  It will search for foriegn key constraints and create a delete statement for each one found in the database.  The procedure has three parameters:@table_name nvarchar(128) = the name of the source table@column_name nvarchar(128) = the name of […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-04-22

306 reads

Technical Article

List Network Share Directories Quickly

Need a quick way to list shared folders?  Do it in one call.  Great for ASP page popups and user drop-down lists.Let's say that you want to display a list of projects, just call usp_GET_ProjectFolder and VIOLA! Only works with 2k; however, can be ported to ss7 if the udf is ported to a proc […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-04-22

375 reads

Technical Article

Report table and column-level extended properties

SQL Server 2000's extended properties provide an easy way to store your data dictionary documentation within the database itself. This stored proc provides an easy way to extract all the table and column-level descriptions from those system tables for reporting purposes. This procedure can easily be modified to provide additional information to suite your needs. […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-04-22

279 reads

Technical Article

Send True SMTP Mail using CDOSys instead of CDONTS

SQL Server 2000 and Windows 2000 Only.Microsoft suggest using CDOSys rather than CDONTS.  CDOSys stands for Collaboration Data Objects for Windows 2000 Subsystems.  Below is a script that allows you do do just that.  NO EXCHANGE REQUIRED!!  Sample sends the user HTML Mail!Be sure to change @ServerIPAddr to your SMTP server.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-04-22

1,935 reads

Technical Article

sp_CHARINDEX

Here's a stored procedure version of udf_CharIndex for SQL Server 7.Sample Usage: DECLARE @iPos INT DECLARE @nRet INT EXECUTE @nRet = sp_CharIndex 'W', 'Hello World', @nPos = @iPos OUTPUT IF @iPos > 0   PRINT 'found' ELSE   Print 'not found' PRINT @iPos  --Only uses on character.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2002-04-22

567 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

A design question in a parent child relationship

By eichnerm

I am not sure which is the best way to proceed. I have parent...

Hyperscale Replicas III

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Hyperscale Replicas III

Development Is Fun

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Development Is Fun

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