Scripts

Technical Article

Get the Value of a BitMask

This function will take a 64 bitmask string and return the value of bitmask. If you need 128, 256, etc simply change the length of the parameter, being careful to remember you may need to change the return type of int to BigInt if you get too long.

You rated this post out of 5. Change rating

2005-01-04 (first published: )

239 reads

Technical Article

Generating sequential numbers - the fast way

It is often necessary to generate a table with sequential numbers, up to a specified upper limit N. For small N, a simple INSERT in a WHILE loop will do. But, for large N, that solution becomes too slow. This script presents a different approach. It generates sequential numbers from the binary representation of N, […]

(2)

You rated this post out of 5. Change rating

2004-12-30 (first published: )

622 reads

Technical Article

Number of Weekdays between two dates - Set Based

Inspired by a post here at SQLServerCentral, I wrote this function to calculate the number of days between two dates that are weekdays. In order to achieve this I used a common SQL table that contains a sequence of number for 1 to X. This was used as an input to the datediff function, and […]

You rated this post out of 5. Change rating

2004-12-24 (first published: )

307 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