James Serra's Blog

Blog Post

Monitoring Power BI

There are a number of options for monitoring Power BI that I wanted to mention: Performance analyzer: Find out how each of your report elements, such as visuals and...

2020-06-02 (first published: )

718 reads

Blog Post

Query Acceleration for ADLS

Just announced is Query Acceleration for Azure Data Lake Storage Gen2 (ADLS) as well as Blob Storage. This is a new capability for ADLS that enables applications and analytics...

2020-05-20 (first published: )

437 reads

Blog Post

Power BI Sharing

There are many ways to share the dashboards, reports, and datasets that you create in Power BI. Below I’ll compare all such options (there are twelve!). First make sure...

2020-03-16

69 reads

Blog Post

Power BI Security

A common topic I have been discussing recently with customers is the security around Power BI. Basically, how to prevent users seeing data they shouldn’t. So I’ll discuss the...

2020-03-19 (first published: )

618 reads

Blog Post

SQL Database MI benefits

As I see a huge number of customers migrating their on-prem databases to the Azure cloud, the main question they ask is about whether they should go with an...

2020-03-10 (first published: )

885 reads

Blog Post

Power BI Real-time Streaming

With Power BI real-time streaming, you can stream data and update dashboards in real-time. Any visual or dashboard that can be created in Power BI can also be created...

2020-02-19 (first published: )

2,993 reads

Blog Post

Azure Storage tips

As a followup to my blog post Azure Data Lake Store Gen2 is GA, I wanted to give some pointers when using ADLS Gen2 as well as blob storage,...

2020-01-24 (first published: )

427 reads

Blog Post

DevOps for databases: “DataOps”

DevOps, a set of practices that combines software development (Dev) and information-technology operations (Ops), has become a very popular way to shorten the systems development life cycle and provide continuous delivery of...

2020-01-16 (first published: )

1,172 reads

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

Planning for tomorrow, today - database migrations

By John Martin

Comments posted to this topic are about the item Planning for tomorrow, today -...

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

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