Archives: March 2013
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 the following code in a SSDT database solution:
The database project should build with this error:
To reproduce, run the following code in a SSDT database solution:
CREATE VIEW [dbo].[aview] WITH SCHEMABINDING AS SELECT id = TRY_CONVERT(int, id) FROM dbo.arealtable
The database project should build with this error:
0 comments, 253 reads
Posted in SQL Tact on 21 March 2013
Conversation History: The Continuing Case Against GUIDs
We had a cooperative relational database design exercise at the office last week as part of our regular department "Lunch and Learn" series, and inevitably one topic that came up is the use of GUIDs as the unique key for a table.
And before long, I had been goaded onto…
And before long, I had been goaded onto…
0 comments, 642 reads
Posted in SQL Tact on 8 March 2013
YYYYMM Math
I had a project recently where I had to do math on a number that represented a date, YYYYMM.
For example, February 2013 would be stored as an integer, 201302.
As an aside, YYYYMM makes WAY more sense than ever storing anything MMYYYY. Why? For one, it sorts correctly. And…
For example, February 2013 would be stored as an integer, 201302.
As an aside, YYYYMM makes WAY more sense than ever storing anything MMYYYY. Why? For one, it sorts correctly. And…
0 comments, 156 reads
Posted in SQL Tact on 1 March 2013



Subscribe to this blog