INSERT INTO [CustomerImages] ([ImageID],[EquipmentID], [ImageData], MIMEType)
SELECT DISTINCT Equipment.[UserId], Equipment.[EquipmentID], [ImageBytes],[MIMEType]
FROM Equipment, [Radactive_ILoad_Images], [Example_E_204__Records]
WHERE Equipment.ID = (SELECT MAX(ID) FROM Equipment)
AND [ConfigurationInternalCode] = 'Ex_E_204_ILoad1'
AND ResizeInternalCode = 'Thumb1' AND ImageId = (SELECT MAX(ImageId) FROM Radactive_ILoad_Images)
|