Category: SQL
DNN – Regain User Access
If you have ever been locked out of a DNN site you maintain (must have SQL access) this solution will help. NOTE: If you don’t have SMTP settings configured this process will not help First find your “Portals” table and update “UserRegistration” = 2 Note: In the example below I…
Compare Number Array Against Column
I recently needed to see what zip codes in Michigan were missing from a table of zip codes that I have in a database. First I had to get an official list of zip codes for Michigan then came up with this script to figure out which of the official…
Compare SQL column against another column
In a recent effort to clean up duplicates in my contacts I came across a script to assist me. In my situation I have some contacts that have had the company name inserted as the first/last name. In my case almost all of the records could be modified to null…
SQLite – Auto-Increment / Auto Generate GUID
Recently was asked if it’s possible to create an auto-incrementing GUID in SQLite. Here is one approach: In Firefox there is an add-on called SQLite Manager (also available at https://code.google.com/p/sqlite-manager/) Open Firefox, in the “Tools” menu select “SQLite Manager” With SQLite Manager open click on the “Database” menu and select…
MSSQL – Remove Line Breaks
Sometimes you need to remove line breaks or carriage returns, the code below should help. The above script will not work if the column type is TEXT so you must convert it first.