Week Starts On Saturday?
A function that emulates SET DATEFIRST 6 within a function for finding relevant date information.
2012-02-29 (first published: 2012-02-15)
552 reads
A function that emulates SET DATEFIRST 6 within a function for finding relevant date information.
2012-02-29 (first published: 2012-02-15)
552 reads
This script will show the currently running queries in the system. It will give the entire script which is involved in the background.
2012-02-28 (first published: 2012-02-01)
1,420 reads
This query shows how to write a T-SQL statement that lists all numbers between 1 and 100 ordered, without use of any DATABASE table with only ONE select statement.
2012-02-20 (first published: 2011-12-31)
2,302 reads
Create a c:\servers.txt list of servers. No spaces or it wont work. Then copy the code into a ps1 file and edit the directroyfilename to show where you want the files to end up.
2012-02-17 (first published: 2012-01-23)
1,884 reads
Find drive, freespace, usedspace and percent free for all drives and mounted volumes.
2012-02-16 (first published: 2011-12-15)
835 reads
3 functions that implement the left (<<), right (>>) and unsigned right (>>>) shift operators, commonly found in C-style languages.
2012-02-15 (first published: 2011-12-30)
8,146 reads
2012-02-13 (first published: 2011-12-30)
1,722 reads
A simple example of using T-SQL and the Boomerang framework to create a data driven subscription.
2012-02-08 (first published: 2012-01-04)
1,955 reads
2012-02-07 (first published: 2011-12-15)
1,068 reads
2012-02-06 (first published: 2011-12-23)
1,573 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