2002-10-28
98 reads
2002-10-28
98 reads
Using the sp_help to get a table structure is very cumbersome. First, in order to print it you have to use"Results in Text" not "Results in Grid". Second, the results are very wide screen-wise and very hard to read or print. Third, you do not get the size or number rows with the same request.This […]
2002-10-28
214 reads
This script will list the spaceused by all tables in a database. You can order the output by changing one of the parameters.It also provides totals
2002-10-27
699 reads
Recently I saw here a script that returns the number of days of the month however I made my own script and I think that it's better elaborated. It's true that this is my opinion, but here it's. Evaluate it yourself.print dbo.f_days_in_month('2000-02-21')
2002-10-26
502 reads
This stored procedure extract the error code and description form the DTS package log tables in the msdb database.You just pass it the package name, step name and the time that the step started ( because you could end up with many entries in the log ) and it will return the Error Code and […]
2002-10-25
2,709 reads
When creating indexes on tables, it is always best to choose columns that have a high degree of selectivity, or uniqueness. This SP, ShowUniqueness, gives the user an easy way to determine the "uniqueness" percentage of a given column or combination of columns.
2002-10-23
477 reads
This script returns the latest package log for the DTS package specified in the @package_name variable. The interface for viewing DTS package logs through Enterprise Manager is limited in the fact that it doesn't provide textual descriptions of the values for the Step Execute Status and Step Execute Results. This makes it difficult to trace […]
2002-10-22
644 reads
We frequently have to work out a date based on a number of working days before or after a specified date, excluding Saturdays and Sundays.Attached is the script to create the function. I call another function called fn_Midnight which was designed to help whe programmers get a date with no time portion without having to […]
2002-10-22
512 reads
Do you run jobs that call BAT files where you wish you could include a formatted date stamp in the output name of an OSQL file? Well, you can using the DOS 'FOR' command. I named a variable FILEDATE and use it as: path\Filename_%FILEDATE%.txt (Note: A BAT file requires double %% in the 'FOR' command […]
2002-10-21
1,133 reads
There isn't a convenient sp or tool in sql server to find out all the tables in a database which have primary keys. This script can help you to list all the tables with primary keys.
2002-10-21
466 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 Databricks Genie Spaces for SQL...
Comments posted to this topic are about the item The Costs of Multiple Platforms
Comments posted to this topic are about the item RegEx Functions II
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