SQL Server – Conditions when value of @@error changes
Hi friends, when we do error handling in our SQL code we use different methods like TRY/CATCH, RAISERROR etc. to...
2016-06-02 (first published: 2016-05-24)
1,359 reads
Hi friends, when we do error handling in our SQL code we use different methods like TRY/CATCH, RAISERROR etc. to...
2016-06-02 (first published: 2016-05-24)
1,359 reads
Recently while working on a scenario I found that in case of transaction if you are doing insertion operation on...
2016-05-16
544 reads
Overview SQL Server, a relational Database management system is mainly used for storing and retrieving data whenever required by its...
2016-05-12
564 reads
HI friends, most of the time we used DBCC FREEPROCCACHE to clear the procedure cache, clears the specific plan from...
2016-05-11
568 reads
Hi friends, continuing from the previous post in this post we will learn how to add the blocking predicate to...
2016-05-09
1,011 reads
Hi friends, in my previous post we have learnt how to implement Row Level Security feature in our database. You...
2016-05-13 (first published: 2016-05-05)
1,475 reads
Hi friends, in SQL 2016 several new security features gets introduced which will help users to protect their data in...
2016-05-03
465 reads
Hi friends, in this post we will discussed another limitation of In-Memory OLTP that in-memory tables as a Target in...
2016-02-12
607 reads
Hi friends, in this blog we will discussed another limitation of In-Memory OLTP that seed and increment value other than...
2016-02-09
522 reads
Hi friends, another limitation that we will discussed is TRUNCATE table command is not supported with memory optimized tables. Let’s...
2016-02-03
1,383 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
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...
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