Today with no time portion
How to get current day with the timeportion = 00:00:00.000.Works regardless of locale.
2002-04-05
460 reads
How to get current day with the timeportion = 00:00:00.000.Works regardless of locale.
2002-04-05
460 reads
This script derives the first day of the month and the last day of the previous month...
2002-04-04
458 reads
Have you faced a situation where you want to have the latest currency rates available upto a particular date. Normally you may have to run sub queries but derived tables is the easiest way to do.
2002-04-04
324 reads
The fastest way of getting LastDayPreviousMonth / FirstDayCurrentMonth
2002-04-04
212 reads
Sample script header to use to describe a stored procedure. This is a piece of the one I use but needs modification for each environment.
2002-04-04
1,262 reads
This procedure will let you execute existing stored procedure with several sets of multiple parameters like: exec _ParamSplit_SP 'ColorSP', "258,'RED';367,'BLUE';125,'GREEN'",";" it will be the same as exec ColorSP 258,'RED' exec ColorSP 367,'BLUE' exec ColorSP 125,'GREEN'Created for SQL 7
2002-04-03
883 reads
The script calculates the end and the beginning of the last, the current and the next months.
2002-04-01
1,023 reads
2002-04-01
796 reads
This script would help find primary key, foriegn key, unique constraints, check constraints on a table. With slight modification you can use it to find various information about a table.
2002-04-01
609 reads
2002-04-01
708 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