Update CC Set Type = 20008-type from Contents CC JOIN VEFN_GetVersionFormatItems('') VI ON VI.ContentID = CC.ContentID JOIN Formats FF ON FF.FormatID = VI.FormatID where type IN (10000,10001) and FF.Name='VCB1'