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,034 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,751 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,447 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,662 reads

Blogs

Friday Basics: the CIA Triad

By

In information security (INFOSEC), there several foundational concepts and principles. One of the ones...

A New Word: the standard blues

By

the standard blues– n. the dispiriting awareness that the twists and turns of your...

How Redgate Flyway Can Boost Your DevOps Journey

By

A brief introduction to the tool and its advantages for database migrations DevOps is...

Read the latest Blogs

Forums

client_app_name is empty in Extended Events output but present in sp_who2

By Pete Bishop

I'm tracing activity on one database and would like to include the client_app_name in...

How to compare data in customer table with other customers to find related cust

By Zond Sita

select Custno, Addr1, City, Res_Phone, Bus_Phone, Fax_Phone, Marine_Phone, Pager_Phone, Other_Phone, email1, email2 from customer...

process records in loop

By Bruin

I'm only processing 50,000 records not everything from the Table where there are 250,00...

Visit the forum

Question of the Day

The Marked Transaction

I want to mark a transaction in the log as a recovery point. How do I do this in my code if I use the transaction, myTran?

See possible answers