SQL Export Function

Adds SQL Export Functions