Skip to content

Instantly share code, notes, and snippets.

View JohnKingsbury's full-sized avatar

John Kingsbury JohnKingsbury

View GitHub Profile
@JohnKingsbury
JohnKingsbury / NCharToNVarChar.sql
Last active November 20, 2019 09:52
TSQL - Converts all NChar fields to NVarChar
declare @tn nvarchar(128)
declare @cn nvarchar(128)
declare @ln int
declare @sql as nvarchar(1000)
declare c cursor for
select table_name,column_name,character_maximum_length
from information_schema.columns
where data_type ='nchar' and
@JohnKingsbury
JohnKingsbury / MapSelections.js
Last active November 8, 2019 11:25
Quick IE compatible method to dynamically filter selections
$.fn.showOption = function() {
this.each(function() {
var span = $(this).parent();
var opt = $(this).show();
$(span).replaceWith(opt)
});
}
$.fn.hideOption = function() {
this.each(function() {
if ($(this).parent()[0].tagName != "SPAN") {