Scripts

Technical Article

Parse a delimited string, return n-th value

This UDF will parse a string delimited by the character you specify and return the value in the n-th position you requested.Example:select dbo.fn_parse('this string', ' ', 1) --> 'this'select dbo.fn_parse('this string', ' ', 2) --> 'string'select dbo.fn_parse('this string', ' ', 3) --> NULLselect dbo.fn_parse('this  string', ' ', 2) --> ''

1 (1)

You rated this post out of 5. Change rating

2002-05-10

482 reads

Technical Article

Retrieve default value for parameter in procedure

This procedure will return DEFAULT value for the parameter in the stored procedure. Usage: Use pubs go declare @Value varchar(30) exec _GetParamDefault 'random_password','@password_type',@value OUTPUT SELECT @VALUE Also accepts different versions, by default, if not specified, first version info retrieved. exec _GetParamDefault 'random_password;2','@password_type',@value

You rated this post out of 5. Change rating

2002-05-10

327 reads

Technical Article

Check in New DDL to SourceSafe

Rather than invent (or learn) a whole new set of tools to preserve and version all DDL underneath our databases, we decided to use SourceSafe (something we're already using for all other source code). -- We've developed this VBscript to run nightly; it recreates object-level DDL in a given database and compares each object's script […]

You rated this post out of 5. Change rating

2002-05-09

147 reads

Technical Article

Multiple Replace

Like the replace function, but can replace more than 1 value at a time.e.g. select dbo.multiple_replace('hello', 'e', '1', default) gives 'h1llo'.  Equivalent to: select replace('hello', 'e', '1')e.g. select dbo.multiple_replace('hello world', 'e;w;ld', '1;2;END', default) gives 'h1llo 2orEND'e.g. select dbo.multiple_replace('hello world', 'e$w$ld', '1$2$END', '$') gives 'h1llo 2orEND'

5 (1)

You rated this post out of 5. Change rating

2002-05-09

439 reads

Technical Article

Scalar Function to Determine Age at a Given Date

This function was written to supplant cumbersome age-at calculations.  To execute, simply set a local INT variable equal to the output of the function.  For example, the following, given my birthdate, computes my own age:    DECLARE @age_at INT    SET @age_at = dbo.f_age_at ('2/16/1954', GETDATE ())

You rated this post out of 5. Change rating

2002-05-09

1,035 reads

Blogs

Building Effective Data Governance Framework: Top Areas to Focus On

By

The post Building Effective Data Governance Framework: Top Areas to Focus On appeared first...

Master the Foundational Basics

By

It tells us to take the time to master the foundational basics of whatever...

Simple Talks Episode 9–Data masking and subsetting

By

The episode on data masking and subetting is out. You can see it here:...

Read the latest Blogs

Forums

Looking for Commercial Kitchen Equipment Manufacturers?

By bhartirefwork

Bharti Refrigeration Works is a leading manufacturers of commercial kitchen equipment. Find reliable solutions...

How To Book Southwest Airlines Group Travel Booking?

By southwestfareway

Southwest Airlines offers specialized group travel services, making it easy for groups of 10...

Nutrim

By nutrimerfahrungen

Nutrim Kapseln sind ein beliebtes Nahrungsergänzungsmittel zur Gewichtsreduktion. Sie enthalten natürliche Inhaltsstoffe wie Appetitzügler,...

Visit the forum

Question of the Day

The Hash Join I

What are the two inputs called to a hash join operation in SQL Server? (choose 2)

See possible answers