In your
INSERT
statement you're only defining the
document
field. Because of this all other fields are left empty so they get their default values.
Try changing your insert to something like
SET @insertString = N'INSERT INTO Images(filename, path, document)...
Just make sure that you provide corresponding values in the
SELECT
portion