T-SQL

Technical Article

Deleting Sets of Rows in huge table

  • Script

There was a problema user was reflecting http://groups.yahoo.com/group/sqlcon/message/1119What I did was following steps1. Divide the count of table into segments for divide2. Then use the even Odd functionality for smooth looping3. Use a simple while loop and SET ROWCOUNT functionality for further deletions across table with checkpoint4. It saved the log swell up and resources […]

You rated this post out of 5. Change rating

2005-07-20 (first published: )

251 reads

Technical Article

Global System UDF to return ISO Date string

  • Script

Updated for Permission assignment change 1/11/1006. Ok, I'll bet that you are asking, What is a Global System UDF, right? By Global I mean that the UDF is available from any database on the server. By System I mean that the two part naming rule does not apply to this scalar function. The UDF conversion […]

5 (1)

You rated this post out of 5. Change rating

2006-01-26 (first published: )

423 reads

Technical Article

Get the #lines in a TSQL view/SP/UDF of a String

  • Script

The following procedure gets a TSQL program object(View/UDF/stored procedure) and a given stringIt searched object's source code for the string and returns the number of lines where a match is found.This is helpful when we want to search all our TSQL code for a specific table name, column etc. and investigate where it is referenced […]

You rated this post out of 5. Change rating

2005-06-02

93 reads

Technical Article

Return WeekNo (ISO 8601 standard)

  • Script

In MS SQL, January 1 of any year defines the starting number for the week. The DATEPART(wk, 'Jan 1, xxxx') always return 1. However, a lot of reports Week No is actually based on ISO 8601 standard, that is January 1 of any year can be Week 53/52 or Week 1. (http://www.merlyn.demon.co.uk/weekinfo.htm#IDC)The Rule is as […]

You rated this post out of 5. Change rating

2005-06-14 (first published: )

263 reads

Blogs

A New Word: Mottleheaded

By

mottleheaded – adj. feeling uneasy when socializing with odd combinations of friend and family,...

Democratizing Core Contributions: A Guide to WordPress.org Badges 

By

In the WordPress community, badges aren’t just for scouts.

Microsoft Purview GA menu’s

By

The new data governance features in Microsoft Purview are now being made generally available...

Read the latest Blogs

Forums

test new topic

By philip.scott

posting a new topic

New article

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New article

Monitoring Azure Blob Storage

By arindamxs

Comments posted to this topic are about the item Monitoring Azure Blob Storage

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers