Scripts

Technical Article

Use of regular expressions in TSQL -- version 2

This script creates 2 new system functions ****************************************** NEW: 1. functions will be case sensitive if database is 2. Replace all or only first occurence ****************************************** fn__regexp_test(@String,@Pattern) returns int execute the method test(@String) on the regular expressions @Pattern returns : 0 : no match 1 : match null : one of the parameters was null […]

You rated this post out of 5. Change rating

2005-01-26 (first published: )

512 reads

Technical Article

Add Wildcards to Advanced Search Stored Procedure

I have found that I can add wildcard support to the Advanced Search Stored Procedure submitted by jgroseth (Posted: 07/02/2004) here:http://www.sqlservercentral.com/scripts/contributions/1201.aspby simply modifying "charindex( c.string," to "patindex('%' + c.string + '%'"I did this to take varying whitespace into account since SQL server does not care about whitespace, for example "INSERT INTO DATABASE_MYTABLE" could have any […]

You rated this post out of 5. Change rating

2005-01-25 (first published: )

512 reads

Technical Article

Generate Random Alphanumeric String

Here's a short script to generate a random alphanumeric string based on newid(). The procedure takes in length (@len) which determines the key length. Length must be between 8 and 32. Result is returned in an output parameter. A test script is supplied.

(3)

You rated this post out of 5. Change rating

2005-01-24 (first published: )

1,275 reads

Technical Article

t-sql function to parse string data

The below function can be used to parse or split out data from a delimited string. The function takes in 3 parameters. The text you want to parse, the 1 character delimiter, and the total count of objects in the text.Text for function is set at size of varchar(2000), feel free to make bigger if […]

You rated this post out of 5. Change rating

2005-01-19 (first published: )

1,873 reads

Technical Article

USER PROCESS CHECK (COMPLETE)

The following runable script is a very simple way to track SPID's and PROCESS information (VERY BASIC) in a small target (Local) database.1. Creates a small database 1.1 must set MDF and LDF (File location information) specific to the drive and file folder locations for each server2. Sets All db options3. Creates single table to […]

You rated this post out of 5. Change rating

2005-01-14 (first published: )

218 reads

Technical Article

Convert Unique Identifier to Varchar data type

Script will drop the Default, Primary, Unique, Foreign Constraints, Index and ROWGUID on Unique Identifier data type column and finally it alters the unique identifier to varchar (38) data type. I have compile and execute the script in my database server. Script has executed successfully.

You rated this post out of 5. Change rating

2005-01-12 (first published: )

764 reads

Blogs

Advice I Like: Failure

By

If it fails where you thought it would fail that is not a failure....

Logged in as a member of an Azure AD Group Error while Deploying DACPAC

By

Quite a long title for a short blog post ??While deploying a DACPAC (from...

Data Conferences – Worth Every Dollar

By

Some of the best career enhancers you can buy.   Why I Go to...

Read the latest Blogs

Forums

A Place where AI Technology Shines

By Steve Jones - SSC Editor

Comments posted to this topic are about the item A Place where AI Technology...

Alternate for xp_delete_file

By PJ_SQL

alternate for xp_delete_file

Select @ for different fields

By bswhipp

I have a need where I need to pass a field name to a...

Visit the forum

Question of the Day

Getting the Object Code

What happens when I run this on SQL Server 2022 in the AdventureWorks2022 database?

SELECT OBJECT_DEFINITION (OBJECT_ID(N'dbo.uspGetBillofMaterials')) AS [Object Definition]; 
GO 

See possible answers