2015-11-18 (first published: 2015-10-29)
1,046 reads
2015-11-18 (first published: 2015-10-29)
1,046 reads
Variables can be direct text or Expressions. It's handy to be able to get both at one pass. This little script does that.
2015-11-17 (first published: 2015-10-18)
2,174 reads
2015-11-13 (first published: 2015-10-19)
2,020 reads
This script is used to compress tables and indexes. It is designed for page compression on all. Just a little ditty to help with our EDW storage and processing.
2015-11-11 (first published: 2015-10-09)
1,333 reads
This scripts calculates the first day and the last day of a given week
2015-11-10 (first published: 2015-10-12)
1,174 reads
Get FirstDate and LastDate of Every month from two Dates.
Like IF we have @date1='05/02/2015' and @date2= '11/25/2015' then we will get list of first date and last date from month 5 to 11.
SELECT ID,FirstDate,LastDate,Month,Year FROM [GetFLDatelist](@date1,@date2)
2015-11-09 (first published: 2015-10-09)
1,284 reads
When you want gain exclusive access to database in order to restore database
2015-11-06 (first published: 2015-10-14)
1,950 reads
Rebuild index is expensive most time. So you don't rebuild all index blindly.
2015-11-04 (first published: 2015-10-05)
1,850 reads
The script uses dynamic SQL twice
first to get the detail about the database structure and create ddl out of it
second to execute each DDL created
2015-11-03 (first published: 2015-10-07)
982 reads
How to Paginate a query result set to keep from pulling the whole result set to the client side
2015-11-02 (first published: 2014-05-05)
3,725 reads
By Steve Jones
It’s time for T-SQL Tuesday again and this is a great prompt to start...
By alevyinroc
T-SQL Tuesday is a monthly blog party hosted by a different community member each...
How I used AI for this postChatGPT to generate images based on info specifically...
Bonjour à tous, La semaine dernière, nous avons effectué une mise à niveau de...
Comments posted to this topic are about the item Adding new column with DEFAULT
I've got a web application for my side business. I've added a SQL Server...
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