If you have to sanitize your field first it gets ugly but is still possible Reference: http://www.sqlservercurry.com/2010/11/format-phone-numbers-in-sql-server.html
Category: MSSQL
Ektron – User Access List
Similar to Ektron SQL – List All Users If you simply need a list of all of your CMS users whether they are admin or otherwise this script will help If you want to show a break down of the groups that each user is in this script will help
Ektron – Remove Content/Folder Permissions
Use EXTREME caution on this query. I recommend you do a backup of your database before you run this script as this will remove all permissions that someone has setup on Ektron.
Unlock Ektron User Account(s)
Should you ever lock out your own account and you have SQL access try this Should you ever need to unlock all accounts, not sure why, but you can try this if you have SQL access
MSSQL DateTime Conversions
Sometimes a basic function like MSSQL Format Date Function can not work as you do not have permission to create a function or you simply need something quick. To get day of week from DateTime column and order it by the proper day of week order. This is rather easy…
Count All Rows In All Tables
There are a few ways to count all of the rows in all of your tables in a database. The “Fastest Option” actually pulls the information from the database where the numbers are stored rather than taking time to count rows.
Distinct Query On One Column
While this query has more than what may be needed this will help you to get data based on one unique column.