Today with no time portion
How to get current day with the timeportion = 00:00:00.000.Works regardless of locale.
2002-04-05
462 reads
How to get current day with the timeportion = 00:00:00.000.Works regardless of locale.
2002-04-05
462 reads
This script derives the first day of the month and the last day of the previous month...
2002-04-04
460 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
329 reads
The fastest way of getting LastDayPreviousMonth / FirstDayCurrentMonth
2002-04-04
213 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,264 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,025 reads
2002-04-01
798 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
613 reads
2002-04-01
711 reads
By Steve Jones
I caught this interesting item over on Pinal Dave’s blog: Eleven Interview Questions that...
By Hemantgiri
I use color-coded connections in SSMS to distinguish Production, Pre-Production, UAT, and Development. But...
WhatsApp CS 628218520154 Jl. Suryopranoto No.40, RT.12/RW.7, Petojo Utara, Kecamatan Gambir, Kota Jakarta Pusat,...
WhatsApp CS 628218520154 Jl. Pegangsaan Timur No.1, Cikini, Kec. Menteng, Kota Jakarta Pusat, Daerah...
WhatsApp CS 628218520154 Jl. Pintu Air Raya No.36 Q, RT.6/RW.1, Ps. Baru, Kecamatan Sawah...
I have some data in a SQL Server 2025 database. It looks like this for the dbo.Customer table:
CustomerID CustomerName PreferredName 1 Steve Steve 2 Andy Andy 3 Brian Brian 4 Allan Allan 5 Devin Devin 6 Steve Steve 7 Sally SallyI want to detect which names have a single trailing space. The CustomerName is a varchar() and the PreferredName is a CHAR(). Does this query detect the problem rows?
SELECT
CustomerID,
CustomerName,
PreferredName
FROM Customer
WHERE CustomerName <> RTRIM(CustomerName)
OR PreferredName <> RTRIM(PreferredName); See possible answers