Technical Article

Using DDL Database Triggers

In this short demonstration, you'll learn how to use DDL database triggers to prevent changes to product and audit changes to comply with Sarbanes-Oxley and other change management requirements. Free registration required.

External Article

Transform your SQL scripts with SQL Prettifier

This article describes the "beta" version of Simple-Talk's SQL formatting tool, SQL Prettifier. It provides links both to try it out online and to download the full source code (members only). Please give us your feedback! We will be offering prizes for any fixes and improvements that make it into "v1". I'd like this to become the de-facto (excuse the pun) tool for presenting code in the Simple-Talk articles, blogs and forums.

Technical Article

SqlBulkTool 1.0

SqlBulkTool is a command line utility that is used to quickly create a mirror of a database. It reads its configuration from an XML file containing source and destination command strings and a list of all the tables to mirror and then handles the work of copying the database in an automated and highly parallelized way.

External Article

SQL Server Full Text Search Language Features, Part 2

This is the second of a two-part article that explores the language features of SQL Full-text Search (SQL FTS), an component of SQL Server 7 and above that allows fast and efficient querying of large amounts of unstructured textual data. Part I dealt with index time language options, covering how words or tokens are broken from the text stream emitted from the iFilters and stored in the index.

Blogs

The Book of Redgate: We Value Teams

By

This value is something that I still hear today: our best work is done...

Troubleshooting TempDB Log Full Errors When SSMS Won’t Connect

By

Have you ever received the dreaded error from SQL Server that the TempDB log...

Accelerating AI with Confidence: Why Microsoft Purview is Key to Responsible Innovation

By

Artificial intelligence is no longer a distant concept. It is here, embedded in the...

Read the latest Blogs

Forums

Bottlenecks on SQL Server performance

By runarlan

We have a BI-application that connects to input tables on a SQL Server 2022...

Is there some good routines for updating SQL Server database objects with GitHub

By Rod at work

At work we've been getting better at writing what's known as GitHub Actions (workflows,...

The Tightly Linked View

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Tightly Linked View

Visit the forum

Question of the Day

The Tightly Linked View

I try to run this code on SQL Server 2022. All the objects exist in the database.

CREATE OR ALTER VIEW OrderShipping
AS
SELECT cl.CityNameID,
       cl.CityName,
       o.OrderID,
       o.Customer,
       o.OrderDate,
       o.CustomerID,
       o.cityId
 FROM dbo.CityList AS cl
 INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID
GO
CREATE OR ALTER FUNCTION GetShipCityForOrder
(
    @OrderID INT
)
RETURNS VARCHAR(50)
WITH SCHEMABINDING
AS
BEGIN
    DECLARE @city VARCHAR(50);
    SELECT @city = os.CityName
    FROM dbo.OrderShipping AS os
    WHERE os.OrderID = @OrderID;
    RETURN @city;
END;
go
What is the result?

See possible answers