Round Natural Numbers to the nearest Power of 10
An ITVF function that rounds a number to the nearest Power of 10
2017-05-15 (first published: 2017-05-05)
398 reads
An ITVF function that rounds a number to the nearest Power of 10
2017-05-15 (first published: 2017-05-05)
398 reads
2017-05-10 (first published: 2017-05-02)
397 reads
2017-05-09 (first published: 2017-05-03)
2,902 reads
Most comman scenario which we face on everyday basis is to fix the orphan database users at the database level. You need to go to each database and fix the orphan users at the each databases.
2017-05-03 (first published: 2017-04-20)
695 reads
This is quick script to ascertain datafile headroom based on current size of the data in a file against the max size (which needs to be set for this to work!)
2017-05-02 (first published: 2017-04-19)
401 reads
2017-05-01 (first published: 2017-04-19)
1,249 reads
End user has entered ‘goodmorning’ and ‘good morning’ interchangeably and it was causing logic failure at application level. So task was to replace ‘goodmorning’ with ‘good morning’ in database wherever it is there.
2017-04-28 (first published: 2017-04-10)
1,116 reads
This table valued function will quickly find the prime factors of any number up to 10 trillion
2017-04-26 (first published: 2017-04-06)
425 reads
Keeps a memory leak under control until the bug fix is developed and applied. Short term band aid.
2017-04-25 (first published: 2017-04-13)
569 reads
This script is for converting Char to nChar and varchar to nVarchar with the same length.
This process has reduced the manual work by 80% (approximately) in our case.
2017-04-24 (first published: 2017-04-10)
595 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