Modified SP_who

Here is a modified SP_WHO procedurewhich returns more information about the current session.I forgot all the thing that i have added to the sproc, but the last addition shows the last executed TSQL statement.There might be a better solution to get the values from DBCC rowset, thou I did not have time to think everything […]

2002-05-28

671 reads

Procedure for Random Numbers

Here is handy procedure to generate random number.I find it useful when I generate large amount of test data in a database.For example if you need to create a Customer Data and what they have purchased in the last month to run perfrmance tests on large amount of data an set up necessary indexes.You can […]

2002-05-13

587 reads

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

4.5 (2)

2002-05-06

1,904 reads

Blogs

Using Write-Debug

By

I wrote a post about PoSh output recently, noting that in general we ought...

T-SQL Tuesday Retrospective #002: A Puzzling Situation

By

For the second T-SQL Tuesday ever — again, hosted by Adam Machanic — we...

Daily Coping 28 Oct 2020

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Index question

By Admingod

We have some indexes we have changed over the last few years to address...

Getting the top unique value by group

By David.Toews 95002

Alright, so I've been banging my head against the wall for a bit on...

table variable

By mtz676

deleted code resolved issue  

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers