select dv.versionid, ff.name, .dbo.ve_getshortpathfromcontentid(cc.contentid) location, text
from contents cc
join vefn_getversionitems('') vv on vv.contentid = cc.contentid
join docversions dv on dv.versionid = vv.versionid
join folders ff on ff.folderid = dv.folderid
where text like '%[^0-9]\?%' escape '\'

