我的查询是将 varchar 转换为字符串,
select top(5)'Insert into jobs(minexperience,maxexperience)values('+
cast(substring(Experience as varchar(50)),0,patindex('%to%',Experience))*365*24*60*60,
cast(substring(Experience as
varchar(50)),patindex('%to%',Experience)+2,patindex('%Years%',Experience)-patindex('%to%',Experience)-2)*365*24*60*60+')'
from requirementsdetailsfororganization
在下面的查询中,我有一个错误“关键字'AS'附近的语法不正确。”
我想将字符串转换为整数。
有什么帮助吗?