Scripts

Technical Article

UDF to convert Seconds to DDD:MM:MM:SS Format

This function takes a number of Seconds in BIGINT format and calculations and displays that in a DDD:HH:MM:SS format.I wrote this because I needed to work out the duration between two datetimes and required the result to be displayed in a Report (VARCHAR (12)) format from a Select statementTo Use:SELECT dbo.csp_SecondsToDaysHoursMinutesSeconds(DATEDIFF(SS, , ))  AS DurationFROM […]

You rated this post out of 5. Change rating

2002-05-09

339 reads

Technical Article

Update existing user accounts default language.

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

140 reads

Technical Article

User defined function to parse delimited strings

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

923 reads

Technical Article

Cursorless Cursor

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 […]

(2)

You rated this post out of 5. Change rating

2002-05-06

1,986 reads

Blogs

T-SQL Tuesday #199 Invitation: Back to on-prem?

By

It’s time for T-SQL Tuesday again! And we’re almost to number 200! T-SQL Tuesday...

Data Skew in Data Engineering: What It Is and How to Fix It

By

You kick off a distributed job expecting it to finish in minutes — but...

Error Deploying GraphQL in Fabric: dm_exec_describe_first_result_set

By

A while ago we suddenly had an error while trying to deploy one Fabric...

Read the latest Blogs

Forums

BCA KCU VETERAN | Tlp/Wa:0817866887

By Layanan BCA 24 JAM

Tlp/Wa_Cs:0817-866-887  Jl. Veteran No.18-24, Krembangan Sel., Kec. Krembangan, Surabaya, Jawa Timur 60175 @BCA KCU...

BCA KCU SALATIGA | Tlp/Wa:0817866887

By Layanan Bank BCA

Tlp/Wa_Cs:0817-866-887  Jl. Jend. Sudirman Jl. Diponegoro No.15, Salatiga, Kec. Sidorejo, Kota Salatiga, Jawa Tengah...

BCA KCP Iskandar Muda | Tlp/Wa:0817866887

By Layanan 24jam

Tlp/Wa_Cs:0817-866-887  Jl. Sultan Iskandar Muda No.Kav. 80/1-2, RT.2/RW.3, Kby. Lama Utara, Kec. Kebayoran Lama,...

Visit the forum

Question of the Day

Representing Money

Which types of currency does the money data type represent?

See possible answers