Missing Data
When we don't have all the information needed to model data, we often use NULL. However, that causes other issues.
2021-04-12
2,762 reads
When we don't have all the information needed to model data, we often use NULL. However, that causes other issues.
2021-04-12
2,762 reads
Georg Ferdinand Ludwig Philipp Cantor is considered the creator of set theory, and his theories are the basis for the naïve set theory you learned in school. But there are lots of other mathematicians you should know, such as Hilbert, Frege, Russell, Zermelo and Dedekind. They made a lot of contributions, too. Hilbert Hilbert is […]
2021-01-19
5,619 reads
How you name data elements in databases and applications programs has often been a matter of personal taste. Decades ago, when I worked for state government, there is a COBOL programmer who would pick a theme for his programs. The paragraphs and variables would be named based on the current theme. One of his programs […]
2021-01-11
2,157 reads
This final level to the first landing completes the basics of a SQL database, by explaining what cursors are and why you should never use them.
2020-11-18 (first published: 2011-11-02)
11,757 reads
2020-10-12
1,990 reads
Joe Celko tackles the most difficult of all the types of data handled by SQL, temporal data, and explains how to avoid the commonest traps for the unwary programmer
2020-07-08 (first published: 2011-06-15)
11,224 reads
Having covered the procedure headers in SQL Server in the previous level, Joe tackles the subject of the contents of stored procedures. In this level, he outlines limitations of TSQL as a procedural language, and what you need to bear in mind when deciding how to use them.
2019-04-03 (first published: 2011-09-21)
13,527 reads
A great deal of the confusion that occurs when a database application is developed comes from a poor understanding of the basics of data. Here, Joe Celko gives a broad coverage of the difficulties you're likely to meet when handling data in databases.
2019-03-26 (first published: 2011-05-12)
20,670 reads
A confusion about the nature of numbers can lead to a number of problems in database applications. Joe Celko gives a simple guide to the subject
2019-03-26 (first published: 2011-05-18)
12,364 reads
Character-handling in SQL is not particularly straightforward, and confusion about collation and character encoding is a common cause of problems with searching, joining, and sorting.
2019-03-26 (first published: 2011-06-01)
9,509 reads
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Every Scooby-Doo mystery starts with a haunted house, a strange villain, and a trail...
We have a BI-application that connects to input tables on a SQL Server 2022...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
Comments posted to this topic are about the item 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; goWhat is the result? See possible answers