CAUTION: This is a very powerful script, use at your own risk! This script will: Drop all non-system stored procs Drop all views Drop all functions Drop all Foreign Key constraints Drop all Primary Key constraints Drop all tables
Category: MSSQL
SQL Connection Test
For more connection string assistance visit: http://www.connectionstrings.com/
Gregorian Date to Hijri Date
Recently I was asked to help convert Gregorian Date to Hijri Date and vice versa. One thing to note is that with Hijri date format you must keep it as a string.
Add Column If Does Not Exist
This code will assist in helping you create a column should it not already exist.
Format Zip Code Properly
Sometimes a zip code is presented in a database with all nine numbers in the same column that has only five numbers. This query below will assist in formatting the numbers properly. Source: http://forums.sqlmag.com/forums/aft/77318
Ektron – Find DMS Content File
Sometimes you’re asked where a DMS file exists on the server and have to track it down, this query should help. Caveat: It helps to know where your root/main asset directory is on your server.
Remove HTML Tags
This script will remove all HTML tags from a given column in a table, useful if you need to simply have the text. Source: http://blog.sqlauthority.com/2007/06/16/sql-server-udf-user-defined-function-to-strip-html-parse-html-no-regular-expression/
Clone A Menu Into Multiple Languages
Source: http://www.codeproject.com/Articles/275767/Ektron-SQL-Script-To-Clone-A-Menu-into-Multiple-La