FirstDayOfMonth() and LastDayOfMonth() functions
Here are a couple of handy date functions that pretty much describe themselves. You can use these to figure out how many days are left in a month.
2002-12-08
624 reads
Here are a couple of handy date functions that pretty much describe themselves. You can use these to figure out how many days are left in a month.
2002-12-08
624 reads
Purpose: To compare two strings with a supplied operator and return true if the strings evaluate to true using the operator provided. This is useful for stored procs to use instead of dynamic sql. YAY! Allowing for the operator and value to be passed in as parms. So that the user on the front end […]
2002-12-07
862 reads
This UDF and its equivalent stored procedure will return the size of a stored procedure, view, rule or user defined function in bytes .
2002-12-07
103 reads
This SP will decrypt Stored Procedures, Views or Triggers that were encrypted using "with encryption" There are 2 versions: one for SP's only and the other one for SP's, triggers and views version 1: INPUT: object name (stored procedure, view or trigger) version 2: INPUT: object name (stored procedure, view or trigger), object type('T'-trigger, 'P'-stored […]
2002-12-06
2,002 reads
There is a requirement here to take a number (such as 124995) and express it in words. We needed a function to do this, as it would be used in an existing document generation system.I have developed the enclosed two functions to do this. Note that the function does not, currently, cater for negative numbers, […]
2002-12-06
146 reads
Sometimes people want a Stored Proc with optional parameters. A lot of times people will use a coalesce for this. The problem with optional paremeters is that the query plan will never be an exact mach for that specific query. ( You never know what paremeters are filled..... )To solve this problem look at the […]
2002-12-06
456 reads
This is a collection of 123 TSQL functions for professional, academic or learning purposes. There are many conversions hexadecimal/octal/binary/Roman numerals, mathematical functions such as hyperbolic, logic and trigonometric. Combinatorial functions such as combinations, permutations (factorial), arrangements. Other interesting functions include turning a number into plain English, Morse code, EBCDIC and vice-versa, Levenshtein Distance (linguistics), encryption, […]
2002-12-05
1,031 reads
T-SQL which scripts out all linked and remote servers. Works on SQL 7.0 and 2000. Remote login password is only decrypted on SQL 7.0.
2002-12-05
10,687 reads
2002-12-05
219 reads
This user-defined function converts a number to character format and adds leading zeroes to pad the field to a specified length. useful for displaying SSNs or other numeric fields where the leading 0's are significant but the field is stored as numeric.To use:select dbo.zPad(, )make sure your length includes an extra column for the sign. […]
2002-12-05
422 reads
2025 exposed a growing gap between AI ambition and operational reality. As budgets tightened...
By John
When organizations migrate workloads to Azure, the focus is usually on architecture, performance, and...
By Brian Kelley
There's a great article from MIT Technology Review about resetting on the hype of...
Comments posted to this topic are about the item The Max PK Length
Comments posted to this topic are about the item My experience using the GitHub...
Comments posted to this topic are about the item The Microsoft SQL Year in...
If I create a multiple column Primary Key constraint, what is the most number of bytes I can include in the constraint?
See possible answers