Many downloads - especially from MS - are now coming as ISO images. Usually you burn these to CD or DVD and then use as normal, but there is a way to access the image directly saving the time/cost of burning. Not a SQL article, but you may find it useful anyway.
2005-10-14 (first published: 2004-07-16)
55,496 reads
Executes a file containing T-SQL code without using OSQL. The file can be up to 80,000 characters. Each line in the file should be no more than 256 characters. (Customize the code as needed.) The DOS Type command is used to retrieve the code. Embedded "go"s are removed so don't expect termination behavior. The only […]
2005-03-25 (first published: 2004-07-14)
536 reads
Removes double spaces in a string, leaving all words seperated by a single space. Run in Query Analyzer.
2004-07-21 (first published: 2004-07-05)
254 reads
Counting the number of ocurrences of characters in a string can be useful, and this script will do the job. It can easily be modified to be a function or to search for ocurrences of strings. Run it in Query Analyzer.
2004-07-20 (first published: 2004-07-05)
142 reads
I had a developer in my company come to me recently with a unique request. He asked if there was any way for sql to return a result set that was flopped. In other words he wanted the rows to be columns and the columns to be rows. So that a result set like this:Col1 […]
2004-07-19 (first published: 2004-07-02)
349 reads
This script deletes all duplicates from a table. It keeps the first instance of the record, and discards all others. If you want to keep the last instance of the record, use MAX instead of MIN. The script can be modified very easily to include more/less fields for comparison. I've successfully used this SP to […]
2004-07-27 (first published: 2004-07-01)
296 reads
sp_BulkExport:Export Data from TSQL without using xp_cmdshell - uses SQLDMO and sp_OA*. Supports a variety of formats and options. In my testing on a 22 million-row table it is NOT as fast as BCP. This is the first rev of the proc and it has not been thoroughly tested.
2004-09-16 (first published: 2004-06-25)
934 reads
I don't remember where I found this little gem, but as a VB Developer it has simplified retrieving dates on many projects. Simply pass the function a datetime value and the format that you want in VB style syntax and the date is properly returned. I have modified it slightly from the original author (who […]
2004-07-23 (first published: 2004-06-24)
302 reads
SQLCalcEngine - evaluate numeric expression similar to the VB eval function.The basic concept is to pass a string containing a numeric expression such as ((2+3)*(4/9)) and receive a numeric value back. The algorithm is based loosely on material found at http://www.arstdesign.com/articles/expression_evaluation.html, as well as material found in the book "Writing Compilers and Interpreters" by Ronald […]
2005-03-31 (first published: 2004-06-22)
318 reads