use VEPROMS set nocount on select contentid, cast(text as varchar(50)) from contents where contentid = 1140 select itemid from items where contentid = 1140 select TOId, RangeID from transitions where fromid = 1140 select roid from rousages where contentid = 1140