Left pad any string with another char
Pads a string (e.g. a number that needs left padding with zeros) with any character for as many as it takes to bring the inputted string to the total desired length.
2002-05-01
575 reads
Pads a string (e.g. a number that needs left padding with zeros) with any character for as many as it takes to bring the inputted string to the total desired length.
2002-05-01
575 reads
This script shows how to retrieve combination of different columns that may have nulls.
2002-05-01
783 reads
This select will be useful for developers/ database designers / DBAs to find the rowlength instantly. This select also makes use of system function to get rid of joins. Only for sql7 and up.
2002-04-30
455 reads
In most places, we use some kind of field naming convention. Many times we have one or more fields with similar name in all tables for some kind of tracking. You can use this query to find similar names in all tables.
2002-04-29
267 reads
Need to Transform a table with Summaries to be plugged into EXCEL or place a table of info in one row. This is cool and has been a real time saver!!! Simply save as a Template file in your favorite template folder. In Query Analyzer go to Menu Tools... Options... General... Note the path of […]
2002-04-26
1,836 reads
Script showing how to count the number of Yes /No answers in the string Inspired by tip that didn't work on Microsoft website
2002-04-26
569 reads
This procedure will be useful for developers/ database designers / DBAs to find the rowlength instantly.To find the row length of a user table, just copy this script into Query analyser and pass the table name for which you want to find the rowlength. @TabName is the table name parameter, if we donot provide this […]
2002-04-25
2,934 reads
Set the Autoclose database option to True and perform a cold backup of your data files without even shutting down the SQL Server Services.
2002-04-25
964 reads
Detect SQL Server Instance(s) using reg.exe from the resource kit, just pass the host name! (and make sure reg.exe from the resouce kit is in the ../tools/bin directory. SS2k Only.Enjoy!
2002-04-23
1,117 reads
How about getting the data when the table data is first queried? The following script checks to see if the specified table (@MyTable) has been updated today. If so, just return the data found. If not, then get the data from a "fresher source". Great for ASP that performs table reporting and needs "baked daily" […]
2002-04-23
1,572 reads
By Steve Jones
Next week I’m at VS Live in San Diego (register and join me) and...
Ten years ago today, I filmed a Pluralsight Play by Play on open source...
By Steve Jones
It’s time for T-SQL Tuesday again and this is a great prompt to start...
Comments posted to this topic are about the item Stored Procedures for Server-Level Object...
Comments posted to this topic are about the item Databricks Genie Spaces for SQL...
Comments posted to this topic are about the item The Costs of Multiple Platforms
I have this data in a table in a SQL Server 2025 database:
EmailAddressID EmailAddress 7 dylan0@ADVENTURE-WORKS.COM 8 Diane1@ADVENTURE-WORKS.COMIf I run this query, which row(s) are returned?
SELECT top 10 * FROM person.EmailAddress WHERE REGEXP_LIKE(EmailAddress, '^d') AND BusinessEntityID IN (7,8)See possible answers