Miscellaneous

SQLServerCentral Article

Mind Your Manners

  • Article

Whether you use the forums here or post questions in the venerable Usenet usegroups, there are some basic courtesies you should follow. Sushula Iyer takes a minute to list some things that might help you get your next question answered quickly and completely.

5 (6)

You rated this post out of 5. Change rating

2006-10-18

4,603 reads

Technical Article

Switch Databases

  • Script

This script changes the physical, logical and file names of a database.  It stores the current database until the next time the script is run, and creates a dummy database for the next update.  The intent was to have minimal downtime even though the load (import, snapshot, etc.) may take a long time.  Three copies […]

You rated this post out of 5. Change rating

2007-02-22 (first published: )

620 reads

Technical Article

Proper Luhn AddCheckDigit for any length #

  • Script

Most of the luhn scripts assume that you are working with credit-cards and then IMPROPERLY calculate their luhn check-digit by starting at the left side (assuming that the core number is always 15 digits).  However, if you don't know the length of your core number, then such an approach will fail when the length is […]

5 (1)

You rated this post out of 5. Change rating

2006-10-10

219 reads

Technical Article

scrript to convert datatypes of multiple columns

  • Script

generates an runs a select statement to convert all th olumns of a certain datatype in apirticular table to another datatype:eg all columns of type int to varchar etc the sp takes three parameters namely the table name, source data type and detination data type generates a select query ad executes it eg: exec ConvertTableTypes […]

You rated this post out of 5. Change rating

2007-07-10 (first published: )

168 reads

Technical Article

Detect invalid FK-data after using "WITH NOCHECK"

  • Script

In situations where FK's have been created using the "WITH NOCHECK" option you can get into troubles because the FK-data is not checked ! (so there may be invalid data in the FK-column !)E.g. ALTER TABLE [dbo].[mytable] WITH NOCHECK add constraint [FK__USED_RESO__Actio__1162CF5F] FOREIGN KEY ( Action_Type ) REFERENCES [dbo].[Action_Types] ( Action_Type ) BOL states "... […]

You rated this post out of 5. Change rating

2007-05-29 (first published: )

531 reads

Blogs

Episode 11 of Simple Talks: Oracle

By

The 11th episode is now live, recorded a few weeks ago at the PASS...

A New Word: Mornden

By

mornden – n. the self-container pajama universe shared by two people on a long...

SQL Training: Black Friday Deals Up to 75% Off

By

This Black Week, don't just get a discount—get ahead! Whether you're a total newbie...

Read the latest Blogs

Forums

Blob Storage automated downloads

By Brandie Tarvin

Dipping my toes into the waters of Azure and of course before I get...

Announcing SQL Server 2025

By Press Release

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

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