我正在尝试在PostgreSQL中实现以下代码,并出现以下错误:
select distinct *
from (
select distinct
vendor,lag(cast(vendor as bigint)) over (order by cast(vendor as bigint)) Previous_Vendor,
(cast(vendor as bigint) - lag(cast(vendor as bigint)) over (order by cast(vendor as bigint))-1) Gaps_in_sequence
from vendor_view
where
vendor not like $$%A%$$ and
vendor not like $$%c%$$ and
vendor is not null and
vendor not like '%-%' and
vendor not like 'T%'
) a
where Gaps_in_sequence > 0 and Previous_vendor is not null order by vendor;
ERROR:
invalid input syntax for integer: "E00001"
这是什么意思?我应该如何删除它?任何建议表示赞赏。