我在postgresql中运行以下查询时收到错误消息ERROR:不允许负子字符串长度:
update main as m set filcase_type=subquery.filcase from
(SELECT filcase_type ,
Position('SR' in filcase_type) ,substring(filcase_type,1,position('SR' in filcase_type)-1) as filcase
FROM main) as subquery
WHERE right(m.filcase_type,2)='SR';
对可能被忽略的内容提出任何建议?谢谢!