Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Category: MSSQL

MSSQL Get Domain From Email Address

Posted on October 19, 2018 By David Kittell

Reference: https://blog.sqlauthority.com/2011/06/18/sql-server-selecting-domain-from-email-address/

Read more

SQL – Select Closest Locations

Posted on September 15, 2017 By David Kittell

This is an older script but still works nicely. Setup: You have a table with medical centers that has the address along with latitude and longitude columns. I used this script with a GPS application that pulled your current location and sent it to a web service to get the…

Read more

Azure MSSQL – Server Firewall Rules

Posted on July 14, 2017 By David Kittell

Run these commands on the master table. First get the existing rules Based on the above query if there are any rules you need to remove get the name and replace Client with the appropriate name If you need to add an IP rule go to https://www.kittell.net/ip.php and update the…

Read more

MSSQL – List Users With Permissions

Posted on June 21, 2017June 22, 2017 By David Kittell

Sometimes you really just need to know how many users you have on your database, the below script will give a quick report for your database. Note: This script is designed to run on a selected database, you will have to select the database first and then run the script.

Read more

MSSQL – Datetime In Local Timezone

Posted on February 2, 2017March 26, 2021 By David Kittell

This function will get the local time based on the time zone difference from UTC

Read more

Microsoft Azure SQL – Create SQL User

Posted on October 13, 2016 By David Kittell

In this example I create a Read-Only user but this will work with any access as long as you change the db_datareader access role to what you need In SQL Management Studio open a “New Query” with [master] database Again in SQL Management Studio open a “New Query” with the…

Read more

MS SQL – Count Users In User Role

Posted on October 10, 2016 By David Kittell
Read more

Azure – MSSQL Server Information

Posted on May 13, 2016 By David Kittell

Same as MSSQL Server Information but is specific to what will work in Azure

Read more

MSSQL – Delta Records

Posted on February 4, 2016February 4, 2016 By David Kittell

Scenario: You have to tables with similar information and you need to see what is different Say Table1 & Table2 are two sales contact tables and you want to combine the tables See SQLFiddle for the data schema to allow you to test the queries below. In each example it…

Read more

Remove Last N Characters From Column

Posted on September 9, 2015 By David Kittell

Recently in a project to list all the plugins in a WordPress site with their versions I had accidently added .0 on to various rows in error. This script was very helpful to correct this error Reference: http://stackoverflow.com/questions/10470471/delete-last-n-characters-from-field-in-a-sql-server-database

Read more
  • 1
  • 2
  • …
  • 13
  • Next

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes