Detecting SQL code smells using code analysis
Watch out, watch out, there's a NOLOCK hint about. And probably a few other SQL code smells.
2018-07-02
404 reads
Watch out, watch out, there's a NOLOCK hint about. And probably a few other SQL code smells.
2018-07-02
404 reads
Phil Factor notes that the EU's approach to the GDPR seems to be "do as I say, not as I do".
2018-06-04
74 reads
So, in general, what information (Scripts, configuration information, lists and documents) ought DBAs to retain about the databases and servers they are responsible for?
2018-05-31 (first published: 2014-11-10)
202 reads
Phil Factor on a journey that started with a decision to introduce a new IT platform, and ended in a disaster that left TSB customers locked out of their accounts, experiencing problems such as zero balances, incorrect currencies, and massively inflated mortgage amounts.
2018-05-07
312 reads
Phil Factor argues that the ability to write simply and expressively is a much under-valued skill in IT, and explains the main traps to avoid.
2018-04-09
112 reads
Building a name-and-address database sounds a disarmingly simple task, but if your name happens to be D'Arcy Join, then you probably know, from painful experience, that most programmers don't get it right.
2018-03-12
335 reads
Sometimes a database can seem to be as willful as a colt. Taming it requires an iron nerve, and unflinching eye contact. Occasionally though, you need to know when to jump the fence and regroup.
2018-02-12
76 reads
Phil Factor on a tale of how dodgy mock data derailed an otherwise-convincing prototype.
2018-01-15
201 reads
After many barren years, Phil Factor is pleased to see the first signs of Spring in SSMS.
2017-12-04
89 reads
Databases, like sheep, get get into some surprising scrapes. However, as long as you've planned for all the common mishaps, your conscience should be clear to take a well-earned holiday.
2017-11-27
71 reads
By gbargsley
One of the first things I review when I inherit a new SQL Server...
By Arun Sirpal
It’s 07:43. Someone’s already left a message. “Something’s wrong with the DB server.” You...
By davebem
I’ve had a Dropbox account for years. Like a lot of people, I started...
WhatsApp:0818-751-777 Gedung Gajah Tebet, Jl. Dr. Saharjo No.Raya 111 Unit N & O, RT.1/RW.1,...
When things go wrong - like trouble signing in, videos pausing, unclear charges, or...
Tlp/Wa_Cs:0817-866-887. Jl. Lenteng Agung Raya No.26 E-F, RT.1/RW.4, Ps. Minggu, Kota Jakarta Selatan, Daerah...
I have a SQL Server 2022 English default installation on a server. I want to detect if there are any upper case characters in rows and I have this code:
SELECT CustomerNameID,
CustomerName
FROM dbo.CustomerName
WHERE CustomerName = LOWER(CustomerName)
Here is the sample data I am testing with:
CustomerNameID CustomerName 1 John Smith 2 Sarah Johnson 3 MICHAEL WILLIAMS 4 JENNIFER BROWN 5 david jones 6 emily davis 7 Robert Miller 8 LISA WILSON 9 christopher moore 10 Amanda TaylorHow many rows are returned? See possible answers