
SELECT '
IF NOT EXISTS (SELECT * FROM tbLocalisationData WHERE Section = ''' + Section + ''' AND CultureCode = ''' + CultureCode + ''' AND ResourceKey = ''' + ResourceKey + ''')
	INSERT INTO tbLocalisationData (Section, ResourceType, CultureCode, ResourceKey, ResourceValue, UserEditable, Comment, SpecialType)
	VALUES (''' + Section + ''', ''' + ResourceType + ''', ''' + CultureCode + ''', ''' + ResourceKey + ''', ''' + ResourceValue + ''', ' + 
		CONVERT(varchar,UserEditable) + ', ' + CASE WHEN Comment IS NULL THEN 'NULL' ELSE '''' + REPLACE(Comment,'''', '''''') + '''' END + ', ' + CONVERT(varchar,SpecialType) + ')
'
FROM tbLocalisationData WHERE CultureCode = 'en-CA'
