Scripts

Technical Article

Maintenance Plan Cleanup Proc

If you use 2 different maintenance plans (one for full-recovery databases and one for simple-mode databases) this proc can help keep the databases in the right plan. You can schedule this as a job and if anyone changes the recovery mode of a database or adds/removes a database, this proc will ensure that the changes […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-04-06 (first published: )

1,663 reads

Technical Article

List of RTA numbers based on the lucky number you

Using this procedure you can get the list of 4 digit number and the sum of those 4 digits is equal to your given input number. its helpful when you choose your RTA (Regional Transportation Authority) Vehicle number.Input For this procedure: Single Digit Number (May be your luck number)Output From this procedure: it gives the […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-04-04 (first published: )

162 reads

Technical Article

Audit SQL Logins

We have auditors in the building, looking at our security (amongst other things). So, we needed an easy way to generate a listing of the SQL logins, and the permissions into each database on our servers (over 70 if them).This script will generate the listings the auditors wanted.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(9)

You rated this post out of 5. Change rating

2007-04-02 (first published: )

5,660 reads

Technical Article

Campare Case Insensitive  CampareCaseInsensitive

Case Insensitive Camparison remains a problem for most developers since SQL Server not supports any built in function for these purpose here is one wich compares varchar strings and returns 1 is mathes and 0 other wiseselect dbo.CampareCaseInsensitive('A','a')

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-03-29 (first published: )

112 reads

Technical Article

Returning a Comma Delimited string

One of the small quirks of SQL is that it can add each row to a variable.In the most common case, this is used to generate a comma delimited list.The script shows how to do this wiht a scalar function, so that multiple rows are returned.The script shows calculating the column sum the hard way […]

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

You rated this post out of 5. Change rating

2007-03-26 (first published: )

643 reads

Technical Article

Generate Stored Procedure/Functions Script with SP

It will help to generate DBscript of Stored Procedure/User defined Functions in SQL server without selecting those thru Enterprise manager.Pass the name of Stored procedures/Functions as parameters to the sp_Generate_Script, it generates the scripts and displayed on screen. Choose text format for result display.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(5)

You rated this post out of 5. Change rating

2007-03-23 (first published: )

2,189 reads

Blogs

How I Built RAG for My Accounting App on Bedrock and pgvector

By

The first version of my accounting assistant could not find a single purchase of...

Why AI isn’t paying off yet, and what to invest in first

By

Why isn’t AI paying off yet? Drawing on lessons from digital transformation, Joyful Craftsmen...

Flyway Tips: Analytics Platforms (Snowflake and Databricks)

By

I’m really excited about some growth in Flyway support. I’ve been asking about this...

Read the latest Blogs

Forums

Pay for Performance

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Pay for Performance, which is...

Too Many Choices

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Too Many Choices

Table Partitioning in SQL Server: A Practical Guide to Managing Very Large Tables (VLDBs)

By sabyda

Comments posted to this topic are about the item Table Partitioning in SQL Server:...

Visit the forum

Question of the Day

Too Many Choices

I have a table, dbo.MasterBrands, with this data:

BrandID OfficialName
1       Samsung
2       Apple
3       Microsoft
4       Adidas
5       Coca-Cola
I run this query. What is returned for Coca-Cola?
SELECT CHOOSE(BrandID, 'Conglomerate', 'Tech and Design', 'Desktop', 'Apparel')
FROM dbo.MasterBrands;

See possible answers