T-SQL

Technical Article

Function To Retrieve Last Index

  • Script

This Function Enables the user to retrieve the Last Index of the character/string in a predetermined string.Eg If you want search for the Last Occurance of 'SQL' in 'SQL SERVER2000 USES ANSI SQL' thenSELECT dbo.LastIndexOf('SQL SERVER2000 USES ANSI SQL','SQL')will return 26.Tested Only in SQL SERVER2000

5 (3)

You rated this post out of 5. Change rating

2004-03-25

2,642 reads

Technical Article

Funcs for Date Formatting (Like Oracle TO_CHAR)

  • Script

Function RJZeroN is used for formatting integer numbers as right-justified strings with leading zeroes according to a specified size (max 20 characters which will hold the largest BIGINT value).  A NULL value is returned if the formatting cannot be done according to the values specified.Example: Format a 3-digit number as a 7-character numberstring with leading […]

You rated this post out of 5. Change rating

2004-03-24

908 reads

Technical Article

An old and new way to query Hierarchical data

  • Script

This script uses an old mathematical way of doing hierarchical queries. The most common way of showing hierarchical data in SQL Server is by creating a stored procedure that calls itself. This is not a recent problem, in fact this programming technique has been around since the first programming languages. By using stacks, you can […]

1 (1)

You rated this post out of 5. Change rating

2007-05-02 (first published: )

557 reads

Technical Article

Copy rows generator

  • Script

This stored procedure is created from the need to copy rows from a table with new value. The script itself will create stored procedure proc_copyrows.The parameters are@TableName: the table name@FilterField: filter field, default is null, means no filter@SourceValue: the value of filter field from source data to be copied@DestinationValue: the new value of filter field@SourceDB: […]

You rated this post out of 5. Change rating

2004-02-13

247 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