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,033 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,033 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,242 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
687 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,594 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,197 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,544 reads
Of course, a rather obvious answer presents itself the next day. After reviewing the actual environment that my colleague was...
2013-02-05
722 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
698 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
961 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,288 reads
Creating a Fabric workspace takes about 30 seconds. Restructuring workspaces after people have built...
By Steve Jones
It’s a small change, but a handy one. Flyway Desktop (FWD) now includes the...
By Steve Jones
Software is hard. While I love our Lucid Gravity, I realize that they are...
Comments posted to this topic are about the item Adding new column with DEFAULT...
Comments posted to this topic are about the item Advanced Deployment Scenarios: Stairway to...
Comments posted to this topic are about the item You Need a DBA Pipeline
Which number did the two COUNT(*) return:
DROP TABLE IF EXISTS #tmp CREATE TABLE #tmp (id INT NOT NULL) INSERT INTO #tmp (id) SELECT gs.value FROM GENERATE_SERIES(1, 5) AS gs ALTER TABLE #tmp ADD my_value INT NOT NULL CONSTRAINT df_tmp_my_value DEFAULT 1 SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1 ALTER TABLE #tmp DROP CONSTRAINT df_tmp_my_value ALTER TABLE #tmp ADD CONSTRAINT df_tmp_my_value DEFAULT 2 FOR my_value SELECT COUNT(*) FROM #tmp AS t WHERE my_value = 1See possible answers