2006-03-16 (first published: 2004-09-29)
222 reads
2006-03-16 (first published: 2004-09-29)
222 reads
SQL Function to calculate number of business seconds between 2 datetime fields. Input Parameters: @startdate - Start Time (datatype DateTime) @enddate - End Time (datatype DateTime) @starthour - Start of Business Day (datatype DateTime) (Format: '1900-01-01 9:00:00') @endhour - End of Business Day (datatype DateTime) (Format: '1900-01-01 17:00:00') @workdays - Business Day string - Use […]
2006-03-15 (first published: 2005-01-17)
251 reads
This version uses the Sieve of Eratosthenes algorithm, which is very fast for moderate upper bounds, but which may be slower than the other versions when the upper bound is very large (because of the overhead of the initial table population)
2006-03-14 (first published: 2003-12-17)
119 reads
This scalar udf takes three parameters @Number INT, @Length INT, @Position CHAR(1) and returns a VARCHAR(50) string which pads @Number with zeros to the specified @Length either to the right or to the left, according to @Position ('L' or 'R').E.g. SELECT dbo.udf_PadNumber(5, 6, 'L') returns '000005' whereas SELECT dbo.udf_PadNumber(5, 6, 'R') returns '500000'. The function […]
2006-03-13 (first published: 2004-08-25)
170 reads
Simple job script to cycle the SQL Log ever 24 hoursThe job is set to disabled as you should review any script that creates a job before enabling it on your server.
2006-03-06 (first published: 2004-10-29)
1,034 reads
Based on Ramesh Kondaparthy's script (Script to Generate DataDictionary for Database, posted 8/5/2005), I made a few format changes and included a few more columns.I modified Ramesh's script so that I could copy the result and paste it into Word as the beginning of a Data Dictionary document. (Hint: Once you've pasted the result into […]
2006-03-01 (first published: 2005-08-12)
534 reads
Probably, many of you know this trick, but I thought it might be useful to people who doesn't know it. This script, when run in query analyzer with text output selected, simply creates property methods code. This example is written for creating property methods for c#. But you can modify it for any language. The […]
2006-02-28 (first published: 2005-04-14)
177 reads
This scipt is inspired by FormatDate - Mimics the VB Format routine for date. But this script work actually only whith a english Server. I improved this by a language independant. I use 2 others functions to retrieve the Long and short month name.
2006-02-27 (first published: 2004-07-23)
214 reads
This script takes a string of up to 8000 characters with a single character delimtier and returns a table with each substring in its own row. A identity column is also returned so you can easily find the n'th item in the list.Script is similar to kmlakov's but doesn't require the item count and adds […]
2006-02-21 (first published: 2005-01-19)
1,265 reads
This script notifies the DBA or Developers with the list of failed jobs. This script useful if you want to use either Mater-Target server option or even single server to monitor the Target servers jobs. You must have SQL MAIL configured on the SQL Server.
2006-02-20 (first published: 2004-08-25)
2,122 reads
By Brian Kelley
If you haven't seen the announcement, Anthropic was able to utilize Claude (Mythos Preview)...
Most embedding pipelines on AWS have the same shape: a job reads rows out...
By Arun Sirpal
Transaction log issues are one of the quietest ways a healthy database turns into...
WA CS (08218154392) Equity Tower, Ground Floor, Unit D & Lantai 8, Unit E,...
WA CS (08218154392) Summarecon Serpong, Perumahan Gading Serpong, Jl. Gading Serpong Boulevard Cluster Scientia...
Comments posted to this topic are about the item Symmetric Key Encryption
If I run this statement in SQL Server 2025, how is the password encrypted?
CREATE SYMMETRIC KEY MySymmetricKey WITH ALGORITHM = AES_256, KEY_SOURCE = 'My secret key source passphrase', IDENTITY_VALUE = 'My secret identity value' ENCRYPTION BY PASSWORD = 'S&perS#cretP@ssword7'; GOSee possible answers