Miscellaneous

Technical Article

Script to find text in stored procedures

  • Script

This is a simple script that when used by command-line OSQL/ISQL can help you locate a stored procedure.How many times have you been looking for stored procedure code and could not find it?  This is a simple method to locate lost code.When you manage many database servers this can become a common problem.  The scenario […]

5 (2)

You rated this post out of 5. Change rating

2007-09-14

2,055 reads

Technical Article

Combine multiple rows into single output

  • Script

We can use this function to combine multiple rows into single one. Generally to create comma separated list for each unique item. So this can create comma separated product list for any given category. The same can be used to make a list of items in a given order.ThanksMohit Nayyarhttp://mohitnayyar.blogspot.com/

5 (3)

You rated this post out of 5. Change rating

2007-09-14

3,801 reads

Technical Article

LSTR() and RSTR(): Enhanced LEFT() and RIGHT()

  • Script

Quite often I need to cut off the first (or last) few characters of a string. To do just that I created two functions LSTR() and RSTR().Syntax: LSTR( @stringtocut, @length )Note: @stringtocut is trimmed in the functionWhen @length is equal or larger than zero, this function performs the same as LEFT( LTRIM(RTRIM(@stringtocut)), @length ).When @length […]

1.67 (3)

You rated this post out of 5. Change rating

2007-09-13

1,545 reads

Technical Article

finding the blocks in sql server

  • Script

Hai buddies,The following procedure can be used to find whether there are any blocks in the sql server.The procedure if run in Master database , can be used like any other system stored procedure from any database.The output of the proc will contain the followingSPID OF RUNNING APPLICATIONAPPLICATION NAMEEXECUTING DATABLOCKED (Y/N)BLOCKING SPIDBLOCKING APPLICATIONEXECUTING DATA (BLOCKING […]

3.67 (3)

You rated this post out of 5. Change rating

2007-09-09

3,693 reads

Blogs

CHOOSE’ing a Beer: #SQLNewBlogger

By

We recently published an article on CHOOSE at SQL Server Central. I thought it...

Don’t Treat Your Data Catalog Like a Data Museum

By

Introduction Treating your data catalog like a “data museum”—a static collection where information quietly...

The trade-offs associated with low-code solutions

By

Low-code solutions often accelerate development and make tasks accessible to people who can’t or...

Read the latest Blogs

Forums

DbaTools With Powershell - Omit The Id Column on CSV Export?

By cajun_sql

I am learning DbaTools in Powershell, and my current project is exporting a CSV...

SSIS - ADO Source Datetime Issue

By RonMexico

I'm using an ADO Net Source to extract data and running into an issue...

Cummulative Total

By jagjitsingh

Hi I have below query and i want Cummulative Total . Total should be...

Visit the forum

Question of the Day

Replacing a Null

What is returned from this code in SQL Server 2022?

DECLARE @value INT = NULL;
SELECT ISNULL(@value, 100.5) AS Result;

See possible answers