Generating number sequences with Common Table Expressions
The script shows one of ways generating number sequence - this one uses CTE.
2011-10-04 (first published: 2008-02-06)
1,961 reads
The script shows one of ways generating number sequence - this one uses CTE.
2011-10-04 (first published: 2008-02-06)
1,961 reads
2011-10-03 (first published: 2008-03-27)
7,224 reads
Copy Multiple objects from One Schema to Another Schema
2011-09-30 (first published: 2011-09-07)
1,559 reads
A function to replace tab characters with the correct number of spaces to align the text as originally intended.
2011-09-29 (first published: 2007-10-11)
2,230 reads
Creates a resultset that expresses the last time a successful CHECKDB was performed on every database in the instance.
Does not work on SQL 2000.
2011-09-28 (first published: 2008-03-19)
5,147 reads
Find every object in every database owned by a particular Login.
2011-09-27 (first published: 2008-07-07)
11,379 reads
2011-09-26 (first published: 2011-09-14)
1,816 reads
Generate Script to create all secondary indexes for a database. I have included the ability to generate online indexes if possible and the ability to move to another file group.
2011-09-23 (first published: 2008-07-05)
3,292 reads
A quick procedure to check which full recovery databases have not had a tran log backup in the given period (default is 7 days). This could mean that the recovery mode might need changing or the transaction log backup jobs need investigating.
2011-09-22 (first published: 2007-08-03)
1,716 reads
A set of user defined functions used to calculate the number of business or working hours (excluding the non working hours) that have passed since a certain point of time.
2011-09-21 (first published: 2007-11-20)
3,168 reads
A RAG pipeline that answers questions in the demo is not the same thing...
By Steve Jones
“A multitude of bad ideas is necessary for one good idea” – from Excellent...
Yesterday I gave a talk for MSSQLTips called “Building a DBA Agent for Your...
I've got a web application for my side business. I've added a SQL Server...
Comments posted to this topic are about the item Looking for New Blood
Comments posted to this topic are about the item Server-Level Row Counts for Tables...
Which number will the COUNT() return after executing the following statements:
DROP TABLE IF EXISTS #test; CREATE TABLE #test (id INT) INSERT INTO #test (id) SELECT * FROM GENERATE_SERIES(1, 3) AS gs ; ALTER TABLE #test ADD flag BIT CONSTRAINT DF_#test_flag DEFAULT 0; go UPDATE #test SET flag = 0 WHERE id = 1 UPDATE #test SET flag = 1 WHERE id = 2 INSERT INTO #test (id) VALUES (4) SELECT COUNT(*) FROM #test AS t WHERE flag = 0See possible answers