Miscellaneous

Technical Article

Smart data archiving stored procedure

  • Script

This stored procedure uses a series of input parametes to generate, and optionally execute a series of SQL commands to move production data to an archive table.  The procedure assumes that the production and archive tables will have the same structure.  The procedure uses the following input parameters:@SourceTable:  This is the name of the table […]

You rated this post out of 5. Change rating

2007-09-05 (first published: )

4,076 reads

Technical Article

Clean up default constraints

  • Script

The script scrapes out all default constraints (optional for particular column, table or script generation for the whole db) in SQL Server 2005 manner. Based on: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlpro2k/html/sql00a11.asp

You rated this post out of 5. Change rating

2007-09-03 (first published: )

581 reads

Technical Article

Function returns String in Proper Case [CamelCase]

  • Script

This is a generalised Function that will return a String in Proper Case [Camel Case]. Means Afetr every space, first later will be in UPPER Case.Example:Input String: 'microSoft sql server'Output String: 'Microsoft Sql Server'

(8)

You rated this post out of 5. Change rating

2007-05-09 (first published: )

21,941 reads

Technical Article

Function to Split a Delimited String into a Table

  • Script

This function splits a delimited string (up to 4000 characters long) into a single column table. The delimiter can be specified at the time of execution. If not specified, the delimiter defaults to a comma. The default length of each value is 100, but that can easily be changed.An example for usage:DECLARE @string NVARCHAR(4000)DECLARE @instruments […]

(6)

You rated this post out of 5. Change rating

2007-05-25 (first published: )

5,673 reads

SQLServerCentral Article

Keyword Searching in SQL Server

  • Article

Have you ever wanted to ensure that keywords in your data are easily searchable? Have you struggled with full-text search? New author Michael Ahmadi brings us an interesting idea for a keyword tracking and searching subsystem based on T-SQL and triggers.

(5)

You rated this post out of 5. Change rating

2008-02-21 (first published: )

12,041 reads

Blogs

Finding the Last Last Name in SQL: #SQLNewBlogger

By

I wrote a piece on the new SUBSTRING in SQL Server 2025 and got...

SQL Server 2025 GAs Today

By

If you aren’t watching the Ignite keynotes today, then you might have missed the...

Run SQL Server 2025 and SQL Server Management Studio on macOS Tahoe

By

Short version You want to get this running as fast as possible. Do these...

Read the latest Blogs

Forums

Email change does not work

By rjkoala1

I changed my email address in Edit Profile page, but it has no effect...

The case for "Understanding our business" training

By David.Poole

Comments posted to this topic are about the item The case for "Understanding our...

Specifying the Collation

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Specifying the Collation

Visit the forum

Question of the Day

Specifying the Collation

I am dealing with issues on my SQL Server 2022 instance related to collation. I have an instance collation of Latin1_General_CS_AS_KS_WS, but a database collation of Latin1_General_CI_AS. I want to force a few queries to run with a specified collation by using code like this:

DECLARE @c VARCHAR(20) = 'Latin1_General_CI_AS'

SELECT  p.PersonType,
        p.Title,
        p.LastName,
        c.CustomerID,
        c.AccountNumber
 FROM Person.Person AS p
 INNER JOIN Sales.Customer AS c
 ON c.PersonID = p.BusinessEntityID
 COLLATE @c
Will this solve my problem?

See possible answers