Finding The Last Date of a Month
Select dateadd(month, 1 ,getdate()) gives the exact date of next month , then find the day of that date. Now back to that days i.e exactly last date of the given month.
2001-10-14
547 reads
Select dateadd(month, 1 ,getdate()) gives the exact date of next month , then find the day of that date. Now back to that days i.e exactly last date of the given month.
2001-10-14
547 reads
2001-10-11
8,567 reads
Ever forget to commit a transaction and then find out hours later that there is deadlocked transactions all over your database server? Worse yet has one of your coworkers done this to your database server? Never again, this stored procedure will net send the machine that has an open transaction, and send you (The DBA) […]
2001-10-08
9,151 reads
Really simple... it returns a list of stored procedure names that contain the passed in string. Useful for finding all stored procedures that call another specified stored procedure. Call with the following command: exec usp_functions_findinUSP @str='sp_lastmodified'
2001-10-08
2,209 reads
Ever wanted to get rid of users who are sitting idle for long periods of time? Here's a script that removes spids idle for a variable period of time.
2001-10-03
4,511 reads
The SQL Server 7.0 Data Transformation Services (DTS) Object Transfer feature transfers logins and users between two servers, but it does not transfer the passwords for SQL Server authenticated logins. (DTS in Microsoft SQL Server 2000 does transfer passwords.)
2001-10-01
1,662 reads
A fast way to get a quick look at all the log sizes and space used in a real time fashion.
2001-09-25
2,549 reads
Copies mdf files located in a directory on a client and attaches them to the connected server. This is the winning solution to the contest that was presented in an article posted at http://www.sqlservercentral.com/columnists/awarren/reattachingdatabases-somecodeandacontest!.asp. That article shows how to do the same thing using DMO. Wynn Muse is the author of this stored procedure.
2001-09-23
3,596 reads
Here are two stored procedures for enabling and disabling all keys (primary and foreign) for a specified database. It makes sure the database specified is not the system databases and the users session is at the DB to have its keys enables/disabled.
2001-09-19
847 reads
This script runs within a DTS package. It searches the backup directory stored as a global variable in the script and trims all backup files older than some number of days. the script includes logging to the C: drive so you can trace the effects of the script. You need to create the global variables […]
2001-09-12
1,519 reads
A while back I wrote a quick post on setting up key mappings in...
By Steve Jones
In 100 years a lot of what we take to be true now will...
Hi, i'm running vs2022. I'm trying out a c# script that i'd like to...
Comments posted to this topic are about the item Missing the Jaro Winkler Distance
I upgraded a SQL Server 2019 instance to SQL Server 2025. I wanted to test the fuzzy string search functions. I run this code:
SELECT JARO_WINKLER_DISTANCE('tim', 'tom')
I get this error message:Msg 195, Level 15, State 10, Line 1 'JARO_WINKLER_DISTANCE' is not a recognized built-in function name.What is wrong? See possible answers