SQLServerCentral Article

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

Introduction When we first start working with SQL Server, most tables are small enough and we do not think much about their size. But over time, a table can collect millions or even billions of rows. For example, an online shopping application may store every order ever placed, a banking system may retain years of […]

External Article

SQL DROP COLUMN Without Breaking Code

Adding a column is relatively easy, since the applications can just ignore it in most cases. But taking a column away can be a little bit more work, as you may have to trick the applications into believing the column is still there. I often see systems where deprecated columns have stayed around “forever” — because people are too afraid to remove them, or because they don’t have the access or capability to modify the source code of the affected applications.

SQLServerCentral Article

Packing and Decoding Device Status Codes with LEFT_SHIFT() and RIGHT_SHIFT() in SQL Server

Some systems store several small status values through a single packed integer. For example, a device integration may require tracking operating mode, alert level, and zone information as one status code rather than separate values in different columns. That creates a practical reporting problem. The packed value may be convenient for an integration format, but […]

Blogs

T-SQLTuesday 204: Are blogs still relevant?

By

This month’s blogging party is hosted by Jeff Ianucci – his challenge is to...

Are Blogs Still Relevant? I Think They Still Are.

By

As for me, I'll keep writing whenever time permits. I don't expect every post...

Reading Blogs: T-SQL Tuesday #204

By

This is an interesting invitation this month. Jeff Ianucci is a new host, and...

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...

Slow - Linked server query

By krypto69

Hi I have this slow query that is pulling data from a linked server....

Too Many Choices

By Steve Jones - SSC Editor

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

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