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,533 reads
This function lists the column name and column id for primary key columns for a given table.
2003-10-24
1,533 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,537 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
303 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
240 reads
2003-10-10
78 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
649 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
612 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
768 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
298 reads
2003-10-01
449 reads
By Chris Yates
Change is not a disruption in technology; it is the rhythm. New frameworks appear,...
No Scooby-Doo story is complete without footprints leading to a hidden passage. In SQL...
By James Serra
A bunch of new features for Microsoft Fabric were announced at the Microsoft Fabric Community...
Ontario, CA is home to a variety of restaurants, but when people talk about...
Ontario, CA is home to a variety of restaurants, but when people talk about...
We’re running SQL Server 2019 with database compatibility level 150, and after recent tuning...
I want to change the recovery time for a database running on SQL Server 2022. What are my options for setting the value in my ALTER DATABASE statement. If I run this code, what can I use in place of the xxx to define what 12 means?
ALTER DATABASE Finance SET TARGET_RECOVERY_TIME = 12 xxx;See possible answers