TRY_CONVERT broken by WITH SCHEMABINDING in SQL Server 2012 Data Tools build
Here's a bug you might find if attempting to schemabind an object that uses the new TRY_CONVERT function.
To reproduce, run...
2013-03-21
1,018 reads
Here's a bug you might find if attempting to schemabind an object that uses the new TRY_CONVERT function.
To reproduce, run...
2013-03-21
1,018 reads
We had a cooperative relational database design exercise at the office last week as part of our regular department "Lunch...
2013-03-08
1,226 reads
I had a project recently where I had to do math on a number that represented a date, YYYYMM.
For example,...
2013-03-01
666 reads
In SQL Server Reporting Services, when adding a new dataset to a report, you may see an error that looks...
2013-02-28
8,437 reads
It's easy enough to use sys.foreign_keys and sys.foreign_key_columns to identify foreign keys. But what if you want to script out your foreign...
2013-02-18
1,178 reads
Here's a script to determine, based on your database's foreign key relationships, what the insertion order would be for, say,...
2013-02-17
1,527 reads
Of course, a rather obvious answer presents itself the next day. After reviewing the actual environment that my colleague was...
2013-02-05
710 reads
A colleague of mine was understandably confused when using the almost-perfect missing index engine in SQL 2008. The engine recommended he include...
2013-02-04
678 reads
Tried something different for the January 2013 meeting of the Baton Rouge SQL Server User Group (brssug.org), which meets every...
2013-01-10
954 reads
If you're working in an environment as a developer without sysadmin privileges, and you are creating database diagrams using Management Studio...
2012-12-10 (first published: 2012-12-03)
3,273 reads
You can find the slides of my session on the €100 DWH in Azure...
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...
Hi everyone I am writing an SP where there is logic inside the SP...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
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