[英]cannot replace a normal view with a late binding view in redshift
I am trying to create view in redshift but getting error.我正在尝试在 redshift 中创建视图但出现错误。 Could you please help me how to solve this?你能帮我解决这个问题吗?
Example:例子:
Query : create or replace view medaff_smrtsrc.DMN_STATUS as SELECT DISTINCT dense_rank()over(order by cs.status,cs.sub_status asc) as STATUS_SID,CASE WHEN CS.STATUS IS NULL THEN 'Unspecified' ELSE TRIM(cs.STATUS) END as STATUS,CASE WHEN CS.SUB_STATUS IS NULL THEN 'Unspecified' ELSE TRIM(cs.SUB_STATUS) END as SUB_STATUS,'sysdate' as T_INSERT_DT,'ETL' as T_INSERT_USER From medaff_ref_spectrum.CASE CS WHERE CS.STATUS IS NOT NULL ;
Error - 0A000: External tables are not supported in views
Then I tried with 'with no schema binding'然后我尝试了“没有模式绑定”
query : create or replace view medaff_smrtsrc.DMN_STATUS as SELECT DISTINCT dense_rank()over(order by cs.status,cs.sub_status asc) as STATUS_SID,CASE WHEN CS.STATUS IS NULL THEN 'Unspecified' ELSE TRIM(cs.STATUS) END as STATUS,CASE WHEN CS.SUB_STATUS IS NULL THEN 'Unspecified' ELSE TRIM(cs.SUB_STATUS) END as SUB_STATUS,'sysdate' as T_INSERT_DT,'ETL' as T_INSERT_USER From medaff_ref_spectrum.CASE CS WHERE CS.STATUS IS NOT NULL with no schema binding;
Error - 42P16: Cannot replace a normal view with a late binding view
You have to DROP
the view and then CREATE
it again.您必须DROP
视图,然后再次CREATE
它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.