Miscellaneous

Technical Article

Compare Definition and Data of table in 2DBs

  • Script

This proc compares the table definition and the data in a table which is in two of your databases. Typically you may have a development database and a production database on the same server and you just want to know that the table is the same on both. (This proc will express the data differences […]

You rated this post out of 5. Change rating

2002-02-11

272 reads

Technical Article

Stored Procedure to read tape backup log

  • Script

If you need to check that the tape back of your database backup files was successful, you would generally read the errorlog for the backup software.If you are just interested in today's results or a particular day's log it can be a pain to get.  You could have a shortcut on the desktop or you […]

3 (1)

You rated this post out of 5. Change rating

2002-02-10

370 reads

SQLServerCentral Article

What is the Maximum Page Size in SQL Server 2000?

  • Article

I have always read that 8060 bytes is the maximum size. This is stated over and over again in Books Online, the MS site and numerous other sites, including this one. However a post in our forum recently questioned this. I decided to verify the problem and do a little research.

4.55 (11)

You rated this post out of 5. Change rating

2007-10-02 (first published: )

37,402 reads

Technical Article

Stored Procedure to SELECT NEXT x TOP y Records

  • Script

This stored procedure implements a kind of SELECT NEXT x TOP y Columns FROM Table WHERE Condition ORDER BY Order. It works on any table that has a unique id column and it works with any WHERE clause and any ORDER BY condition. The only drawback is its very poor performance on large tables. This […]

You rated this post out of 5. Change rating

2002-02-06

1,222 reads

Technical Article

Convert a given date to GMT

  • Script

In SQL 7 you had no way to convert local time to GMT (UTC time) which was added in SQL 2K as GETUTCDATE() which will output the current date you would get with GETDATE() but a it's GMT counterpart. Although this was a great improvement I work with data on another server that's front end […]

You rated this post out of 5. Change rating

2002-02-05

606 reads

Technical Article

Splitting string of values to table

  • Script

This function can convert string with separated values to table. Exclusive feature: items inside quotes will not be splitted! Now you can easily perform joins on CSV strings! For expample: fn_split('1, 2, ''3, 4'', 5',',')= 1 2 3, 4 5 First parameter - string with values, second - delimiter character.

5 (1)

You rated this post out of 5. Change rating

2002-02-05

1,178 reads

Technical Article

Date/Time formatting function

  • Script

T-SQL analog for Visual Basic FORMAT function. Created for MSSQL 2000. Works regardless of language settins on server or client side! fn_format('YYYY/DD/MM HH:MI','2002-03-13 12:00') = '2002/13/03 12:00' fn_format('DD.MM.YY','2002-03-13 12:00:00') = '13.03.02' fn_format('HH:MI:SS','2002-03-13 12:00:00') = '12:00:00'

You rated this post out of 5. Change rating

2002-02-05

969 reads

Technical Article

Run a blackbox trace

  • Script

There is a script for setting up a blackbox trace on SQL 2000 described by Kalen Delaney in "Inside SQL Server 2000". Since I can never remember where to look it up I wrote this simple stored procedure to run the blackbox trace when I need it. This should be used with caution as it […]

You rated this post out of 5. Change rating

2002-02-05

624 reads

Blogs

How to find free space in Azure PosgreSQL

By

I wanted to figure out how big (or approximately how big) my dump file...

T-SQL Tuesday #180: Good enough is perfect Roundup

By

This month, I prompted bloggers to discuss whether good enough is perfect. Thank you to all...

Using SQL Compare with Read-only Access

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Read the latest Blogs

Forums

Announcing SQL Server 2025

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Announcing SQL Server 2025

Running Steve's Code

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Running Steve's Code

New SQL Server 2022 Functions

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New SQL Server 2022 Functions

Visit the forum

Question of the Day

Running Steve's Code

Can you run this code in any of your SQL Server 2019 databases without error?

CREATE OR ALTER PROCEDURE [dbo].[StevesAmazingProc]
AS
    
        SELECT Consumer_ID ,
               Trend_Category ,
               Bit_Trace
        FROM    NewWorldDB.dbo.MarketTrend;
    
GO

See possible answers