-- Collection of code snippets by Arne Vajhøj 
-- (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
SELECT 'ALTER TABLE ',TABLE_NAME,' ALTER COLUMN ',COLUMN_NAME, ' VARCHAR(',CHARACTER_MAXIMUM_LENGTH,')'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE DATA_TYPE='nvarchar'
