update ca_ger.cln_trans_base
set stock_age=cast(week_starting)-b.min_date
from (
select pon+season_code as p,min(cast(week_starting as date)) as min_date
from ca_ger.cln_trans_base a
where a.gross_sales_value>0
and aseason_code!='0'
group by pon+season_code
) as b;
上述语法有什么问题?
答案 0 :(得分:0)
这是问题cast(week_starting)
。您需要将其投射为某种东西。