|
|
|
|
|
|
|
| Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Detecting Characters | |
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? | |
Think you know the answer? Click here, and find out if you are right. | |
| Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Displaying Money I want to get the currency sign displayed with my amount stored in a money type. Does this work? DECLARE @Amount MONEY; SET @Amount = '?1500'; SELECT CAST( @Amount AS VARCHAR(30)) AS Euros Answer: No, the assignment fails. Explanation: This doesn't work. The money data type takes numeric values. Without quotes, the assignment works, but the display is just the monetary unit. If you want a symbol, you need to use the FORMAT function. Ref: Money and Smallmoney - https://learn.microsoft.com/en-us/sql/t-sql/data-types/money-and-smallmoney-transact-sql?view=sql-server-ver17 |
| Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
| SQL Server 2019 - Development |
| non ascii columns in a utf-8 .txt file - hi, we couldnt get our upstream data source developers to supply what is sometimes chinese and i think sometimes greek symbol (and maybe other non printables) laden city, state/province columns in english instead. so for now, we want to fill the columns with blanks if the sql condition i show way below is true. we […] |
| Editorials |
| The Data Model Matters - Comments posted to this topic are about the item The Data Model Matters |
| Over or Under Provisioned - Comments posted to this topic are about the item Over or Under Provisioned |
| Article Discussions by Author |
| Converting Money - Comments posted to this topic are about the item Converting Money |
| Understanding SQL Server PARTITION BY with Examples - Comments posted to this topic are about the item Understanding SQL Server PARTITION BY with Examples |
| Running SQLCMD I - Comments posted to this topic are about the item Running SQLCMD I |
| Secure Cached Plans - Comments posted to this topic are about the item Secure Cached Plans |
| Complex Data Processing with dbt Python Models: The Fabric Modern Data Platform - Comments posted to this topic are about the item Complex Data Processing with dbt Python Models: The Fabric Modern Data Platform |
| Fuzzy String Matching in SQL Server 2025 - Comments posted to this topic are about the item Fuzzy String Matching in SQL Server 2025 |
| Representing Money - Comments posted to this topic are about the item Representing Money |
| SQL Server 2022 - Administration |
| Bank BCA KCU BCA KCU Jayapura telp 0817 844 112 - WhatsApp CS,0817844112 Komp. Pertokoan Jayapura, Jl. Pacific Permai Jl. Dr. Sam Ratulangi No.31 Blok C - 30, Dok II, Kec. Jayapura Utara, Kota Jayapura, Papua 99112 |
| Bank BCA KCU Tanjung Pandan telp 0817 844 112 - WhatsApp CS,0817844112 Jl. Jend. Sudirman No.17, RT.008/RW.04, Pangkal Lalang, Kec. Tj. Pandan, Kabupaten Belitung, Kepulauan Bangka Belitung 33416 |
| PolyBase Trace Flags - Are there any good articles on all the trace flags that are enabled on SQL Server when you install PolyBase? From what I can see most of them are undocumented. which seems a bit odd given Microsoft are forcing these on the environment. These 37 odd trace flags have been added to my client's SQL […] |
| Replacing Maintenance tasks now using SSMS 22 - what to do with File operations - Unfortunately I'm using SSMS 22. It didn't come with maintenance plans by default. I ran visual studio installer to install the extra components (SSIS, B1 and something else) so I could create tasks. I can now create tasks but cannot see the toolbox to add tasks e.g. backup task. So can only create an empty […] |
| SQL Server 2022 - Development |
| Install SQL Scripts via GUI Wizard - Hallo all! My problem is this: I have quite a bunch of TSQL scripts to install several tables, procedures, jobs, etc. into SQL databases. Depending on the local system, some changes (e.g. parameters) have to be made in those scripts. So far, each script has to be installed manually one by one, which is quite […] |
| |
| ©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |