Function to List Primary Key Columns for a Table
This function lists the column name and column id for primary key columns for a given table.
2003-10-24
1,569 reads
This function lists the column name and column id for primary key columns for a given table.
2003-10-24
1,569 reads
This script converts string-based IP addresses to their numeric equivalents so that it is easy to do arithmatic on them such as find an IP address that is within a range.NOTE: This function calls the split function which is included in the post.
2003-10-20
1,590 reads
Are you managing big databases with a lot of tables like SAP as I'm?Do you use sp_spaceused, as I'm?Do you want to know your n biggest tables as I'm?Then don't search any longer.I'm using this script every day for may maintenance jobs.I generates, like sp_spaceused, out of sysindexes the n biggest tables without any cursor, […]
2003-10-20
315 reads
I routinely need to retrieve and package query result sets in an XML package. The built in functions supported by SQL Server 2000 are effective, but are often more of a pain than a help. This routine can be used in a simple select statement to XML encode the contents of a column during the […]
2003-10-14
257 reads
2003-10-10
90 reads
Calculates the factorials of numbers between 1 - 31.High level is 31 because maximum stored procedure, function, trigger, or view nesting level is limited to 32.
2003-10-08
667 reads
This script will generate a set of DBCC DBREINDEX commandsthat can be executed to rebuild the indexes. Additional information is provided to assist with sizing of the fillfactors.
2003-10-03
634 reads
Here is a revised version of the crosstab query I submitted last week. This new version avoids the WHILE loop (which was used in my pervious version) and is thus COMPLETELY SET-ORIENTED for better performance.
2003-10-03
801 reads
I have a table with multiple rows for Description belonging to one Heading. For each row of data I need a .The xml should look like this: A heading 234567890123456789010 234567890123456789010 234567890123456789010 ...(to ) A heading 234567890123456789010 234567890123456789010 ...(to )
2003-10-03
322 reads
2003-10-01
464 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