INSERT INTO
    STOR.T_STORAGE_WORK_SCHEDULE (StorageWorkScheduleID, Storage, DateBegin, DateEnd, "User", CreateDate)
SELECT
    newid(),
    s.StorageID,
    CAST(GETDATE() AS DATE),
    CAST('01.01.2000' AS DATE),
    (SELECT TOP 1 u.UserID FROM VCLIB.T_USERS u),
    CAST(GETDATE() AS DATE)
FROM STOR.T_STORAGE s
WHERE
    Locked = 0
GO