2003-10-10
77 reads
2003-10-10
77 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
645 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
611 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
765 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
293 reads
2003-10-01
446 reads
This script will take a string (8000) and add a carriage return at the closest space to nth char. e.g. You only want 50 characters per line. This will add carriage return at the closest space before the 50th character.
2003-09-30
226 reads
Crosstab queries (also called "pivot tables") in which you know beforehand the number of column values to aggregate by, can easily be performed in T-SQL using CASE statements wrapped in the SUM function. Where things get tricky, however, is when you don't know how many aggregation values exist, and you are required to write a […]
2003-09-26
3,609 reads
This is the standard sp_helptext from SQL Server 2000 modified slightly to return the object definition as an XML document.The document is structured in the following format:I admit it was not a lot of work since I merely modified the final SELECT statement from Microsoft's own procedure, but I still find this very useful.The only […]
2003-09-26
202 reads
The error checking seems to work better than the @@error after exiting out of a xp_cmdshell DOS task concerning a failed or successfull attempt.
2003-09-26
526 reads
By James Serra
There are three Azure SQL products with so many different deployment options, service tiers,...
By Steve Jones
I hosted this month’s T-SQL Tuesday party with my invitation asking about tracking permissions....
By Steve Jones
I was asked to do some a little thinking and brainstorming recently. Rather than...
Hi, Does anyone have experience with MEMORYBROKER_FOR_RESERVE ? when suddenly there is somehow constantly...
I just learned that my database was created on my C:\ drive in the...
I am needing to migrate a MSSQL db to MySQL, on a different server...
I have a complex database with a few filegroups and files. Can I run a backup command like this? (assume file/filegroup names are valid).
BACKUP DATABASE [complex] FILE = N'thirdone' , FILE = N'thirdtwo' , FILEGROUP = N'second' TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL16.SQL2022\MSSQL\Backup\complex.bak' WITH NOFORMAT, NOINIT, NAME = N'complex-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GOSee possible answers