Miscellaneous

Technical Article

Retrieve default value for parameter in procedure

  • Script

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

332 reads

Technical Article

Scalar Function to Determine Age at a Given Date

  • Script

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,057 reads

Technical Article

Update existing user accounts default language.

  • Script

When changing the default language of a server it is neccessary to run sp_defaultlangauge against any existing logins. The reason is default language only effects any new accounts created after this change is made. This script is designed to help you quickly make the adjustment for all existing accounts. Note: this has been tested under […]

You rated this post out of 5. Change rating

2002-05-09

127 reads

Technical Article

User defined function to parse delimited strings

  • Script

This UDF parses a comma delimited string and returns a table with the parse strings as rows. Usage:  select * from fn+PareseString('12,13,14,67')Will return a table with the following rows12131467Can be modified to have an additional parameter for the type of delimiter.

You rated this post out of 5. Change rating

2002-05-07

906 reads

Technical Article

Cursorless Cursor

  • Script

Here is as sample of implementing cursor.In some cases my tests showed that this approach performs better than native cursors in SQL Server.All you have to do is move the dataset into a temp table with a new Identity column and then use a simple loop to extract the data as you would do normally […]

4.5 (2)

You rated this post out of 5. Change rating

2002-05-06

1,975 reads

Blogs

Automated SQL Server Benchmarking with HammerDB and Docker: A Complete Testing Framework

By

I’m excited to announce the release of a new open-source project that fully automates...

Automated SQL Server Benchmarking with HammerDB and Docker: A Complete Testing Framework

By

I’m excited to announce the release of a new open-source project that fully automates...

Advice I Like: Praise

By

Don’t reserve your kindest praise for a person until their eulogy. Tell them while...

Read the latest Blogs

Forums

Change Tracking Data Retention Options

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Change Tracking Data Retention Options

Requiring Technical Debt Payments

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Requiring Technical Debt Payments

Using the FP-Growth Algorithm to Mine Useful Patterns in Data

By Daniel Calbimonte

Comments posted to this topic are about the item Using the FP-Growth Algorithm to...

Visit the forum

Question of the Day

Change Tracking Data Retention Options

If I am running this code:

ALTER DATABASE AdventureWorks2017 SET CHANGE_TRACKING = ON (CHANGE_RETENTION=4 xxx);
What are the possible choices for xxx?

See possible answers