May 06 2024 05:53 AM
How to fetch the customers names, who's having first letter CAPITAL ??
May 06 2024 10:00 PM
Solution@HarshaChilakala , by using a CS = "Case Sensitive" collation, for example:
;WITH names AS
(SELECT 'Smith' AS name UNION ALL
SELECT 'Miller' UNION ALL
SELECT 'taylor')
SELECT *
FROM names
WHERE LEFT(name, 1) COLLATE SQL_Latin1_General_CP1_CS_AS = UPPER(LEFT(name, 1)) COLLATE SQL_Latin1_General_CP1_CS_AS
Aug 06 2024 12:37 AM
May 06 2024 10:00 PM
Solution@HarshaChilakala , by using a CS = "Case Sensitive" collation, for example:
;WITH names AS
(SELECT 'Smith' AS name UNION ALL
SELECT 'Miller' UNION ALL
SELECT 'taylor')
SELECT *
FROM names
WHERE LEFT(name, 1) COLLATE SQL_Latin1_General_CP1_CS_AS = UPPER(LEFT(name, 1)) COLLATE SQL_Latin1_General_CP1_CS_AS