Read the registry using T-SQL
This script uses the extended stored procedure xp_instance_regread to read a value from the registry
2004-02-20
1,497 reads
This script uses the extended stored procedure xp_instance_regread to read a value from the registry
2004-02-20
1,497 reads
Indexes and table Statistics play a big role in an OLTP database for better query performance. Maintaining statistics on a weekly basis is important but a heavily updated database tables need more emphasis on Statistics and frequent updates. Instead of trying to issue “sp_updatestats” for the entire database, you can choose tables which are heavily […]
2004-02-17
2,001 reads
This stored procedure is created from the need to copy rows from a table with new value. The script itself will create stored procedure proc_copyrows.The parameters are@TableName: the table name@FilterField: filter field, default is null, means no filter@SourceValue: the value of filter field from source data to be copied@DestinationValue: the new value of filter field@SourceDB: […]
2004-02-13
273 reads
Generate an html-excel file with any table. Does not need Excel to generate , because does not use Excel automation
2004-02-12
439 reads
Search all text fields in a database for a literal string.Outputs SQL statements to query analyser window, which can then be run in a new window.
2004-02-10
210 reads
Stored procedure to search every field in the database for a string literal. Run the stored procedure in Query analyser, which will output sql statements to do the search. The output of these searches will be the update sql, which again should be pasted into a query analyser window. As the stored procedures do not […]
2004-02-10
267 reads
This script outputs the data in chronological order from the current SQL Server log.Output columns are: Log Entry Time, Event Source, Log Entry Text. This data matches with the data that can be seen under the SQL Server logs view in Enterprise Manager.The script is stand alone, but could easily be parameterised to work as […]
2004-02-10
891 reads
Generate an html-excel file with any table. Does not need Excel to generate , because does not use Excel automation.
2004-02-08
534 reads
sp_XTAB (prototype) produces pivoted (crosstab) views/output with a minimum of fuss.No messing with code, just tell XTAB what you want to pivot.Tested to 764 pivoted columns, XTAB can generate up to 63000 characters of dynamic sql. Example (deliberately over-simplified)----------------------updated 27 January 2004Use NorthwindEXEC sp_XTAB 'Northwind','xtEMPL_COUNTRY','Orders','EmployeeID','ShipCountry', '', 'OrderID','COUNT','NULL', '', 'SELECT xtEMPL_COUNTRY.* FROM xtEMPL_COUNTRY' -- Include optional […]
2004-01-24
398 reads
Function to allow for checking if an IP address is a private IP address. Will convert the IP to a bigint equivalent if within the private range, otherwise it will return null if IP is a public address.Requires function IPStringToNumber which is included in the post
2004-01-23
1,323 reads
By Steve Jones
I was messing around with SQLCMD and I realized something I hadn’t known. I’ve...
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...
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