with tmp as (select *, xaoCodeVC = CONVERT(varchar(max), xaoCode) from FormDefinitions)
select *, first500ofX= SUBSTRING(xaoCodeVC,
PATINDEX('%Determine part ID for Product version and installation - for base price lookup%', xaoCodeVC), 500)
from tmp
where xaoCode like '%Determine part ID for Product version and installation - for base price lookup%'
|