sp_dbsize
I'm trying to repost the same script submitted on 7/9/2003 which didn't get posted completely for some reason.
2003-07-27
765 reads
I'm trying to repost the same script submitted on 7/9/2003 which didn't get posted completely for some reason.
2003-07-27
765 reads
A simple UDF for padding out numbers with a specific character (eg: pad 3 to show as 003).Usefull when you can only sort as a text item or for formatting purposes.Script is similar to the SPACE() function but allow the padding character to be defined.Usage:dbo.padNumber('string to pad', padsize, padchar)eg:SELECT dbo.padNumber('53', 4, '0') as testNumReturns:testNum-------0053
2003-07-25
201 reads
Enter the starting zip code and the number of miles for a radius search and the SP will return all the zip codes within the number of miles specified.The data file can be found at http://www.census.gov/tiger/tms/gazetteer/zips.txtThe record layout van be found at http://www.census.gov/tiger/tms/gazetteer/zip90r.txt
2003-07-24
2,478 reads
This works, however code is creating a live temp_1 table in the database instead of using a #temp_1 temporary table because is just would not work.The next idea I had was to use a unique table name per connection for temp_1, but I would really rather use temporary tables.I am hoping some SQL guru's can […]
2003-07-22
129 reads
Oftentimes there is a need to retrieve different types of the same object (e.g. contacts). For example, in a Contacts database, you might have a Contact table containing many different types of contacts (employees, customers, suppliers, etc). Typically, a user might need to see a report of all different types of contacts for an order […]
2003-07-18
808 reads
I manage quite a few hundred databases across the company. Time to time I get a question if I can check wheather a database is beeing used or not, and if it is, by whom?There are probably a 1000 ways to do this, but I've created a script for creating a scheduled job that runs […]
2003-07-15
2,655 reads
An easy way to organize the data by groups of sequential numbers. This is very helpful for splitting up a large file into numerous smaller files. You can then create the smaller files by filtering for the row number per file.
2003-07-09
225 reads
Use this script to make HTTP posts or requests from withing SQL. It uses the XML HTTP COM object.
2003-07-08
1,060 reads
The following stript combines two previous articals. sp_MStablespace was being demonstrated with a cursor. To reduce the code the sp_MSforeachtable could be used.
2003-07-08
543 reads
I was asked by a customer to create a scheduled weekly report detailing work that had been completed in the previous week (Monday to Friday) I figured they might lose the report or something might happen to stop the scheduler from running it, and I didn't want to have to modify my script to work […]
2003-07-07
147 reads
By Steve Jones
One of the language changes in SQL Server 2025 that I’ve seen a lot...
By Steve Jones
I hosted this month, but I decided to put my own entry in as...
By Chris Yates
I get asked a lot about why or how I began working with databases...
I’ve been thinking a lot about the role of consulting in engineering projects. Having...
Hi experts, I’ve been going through several articles and videos about Columnstore indexes, but...
Recently stood up a 2022 Enterprise server. Have 8 publications with subscriptions on a...
I get a new SQL Server instance from my build team. How can I tell if the instance was installed using a slipstream installation later?
See possible answers