TSQL Challenge 54 - Find the longest matching area code
Your job is to write a query that identifies the longest matching country/area code from each phone number based on the information stored in an area-code reference table.
Your job is to write a query that identifies the longest matching country/area code from each phone number based on the information stored in an area-code reference table.
Whenever rows or columns are deleted from a table, SQL Server reuses space to accommodate new data. However, this is not the case when a variable length column is deleted. The space used by this type of column is not reclaimed automatically. Variable length columns can be of data types varchar, nvarchar, varchar(max), nvarchar(max), varbinary, varbinary(max), text, ntext, image, sql_variant, and xml. In this tip, I have tried to put forth a solution to reclaim this space and this should work for SQL 2005 and later versions.
The SQL-92 standard introduced the LEFT Outer Join operation which offers a powerful alternative to standard relational processing to perform full hierarchical processing naturally and inherently. This enables SQL to transparently integrate relational data with XML, IMS and other forms of legacy hierarchical data. This can also allow the so far overlooked integration of IMS and legacy data with the Internet and XML, and visa versa.
Today we have a guest editorial from Andy Warren that talks about what DBAs might need to know in the future.
You are a database developer looking for a common approach for handling read and write access to binary files. You may be a DBA wanting to read various information from binary files and collect it into tables. The code sample presented in this tip will get you started with binary file content handling in SQL Server.
Platform as a service, a new way of looking at applications. It's analogous to SAAS and IAAS, which can improve the efficiency of the software purchase or the hardware acquisition process. Steve Jones notes that this is something he'd like to see for database platforms.
In part 2 of our best practices clinic, Brad McGehee looks at a couple of the items that were misconfigured on the SQLServerCentral database instances.
This article demonstrates how to prevent primary key violation issues in transactional replication.
Free training sessions brought to you by the AppDev and BI Virtual Chapters of PASS.
By Steve Jones
For a number of years, we’ve produced the State of the Database Landscape report,...
By Steve Jones
I coach volleyball and I do a lot of stat stuff on paper. I...
By Steve Jones
dolorblindness – n. the frustration that you’ll never be able to understand another person’s...
Comments posted to this topic are about the item The Power of Data and...
Comments posted to this topic are about the item What's the Date?
Comments posted to this topic are about the item Two New Shortcuts for Fabric...
In SQL Server 2025, there is a new function that returns the current date without the time. What is it?
See possible answers