CreateDBREINDEX
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
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
763 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
291 reads
2003-10-01
443 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
224 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,563 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
197 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
Uses the haversine formula to calculate distance between 2 long / lat points. This can be used with a zip code / lat and long table that are available from the census bureau or post office.The @R can be tweaked dependent on what gives you the best result (its the radius of the earth, fluctuates […]
2003-09-25
732 reads
This a modification to the script given by Preethi.It generates prime numbers to the upper bound you specify.Modifications are using following facts from algebra:1. All prime numbers greater than 3 can be written in the form 6 * X +/- 1.2. Instead of checking the module for ALL numbers
2003-09-25
370 reads
By Steve Jones
ochisia – n. the fear that the role you once occupied in someone’s life...
This is a quick blog post, mainly so I have the code available if...
Praise whatever deity you believe in, because it’s finally here, a tenant switcher for...
I've read lots of the horror stories about nested views in databases where they're...
Hello! How do I grant a user to read-write to a single database and...
When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?
See possible answers