可以,在你建视图的语句中进行时间格式化就好了.create view date_view as select substr(acct_open_dt,1,4)||'-'||substr(acct_open_dt,5,2)||'-'||substr(acct_open_dt,7,2) as etl_date from tableName where xxx='000000000101'
Create view v1 as select to_date(日期字段,'yyyy-mm-dd') as Date1 from TableName
select
substr(acct_open_dt,1,4)||'-'||substr(acct_open_dt,5,2)||'-'||substr(acct_open_dt,7,2) as etl_date from tableName
where xxx='000000000101'
as
select to_date(日期字段,'yyyy-mm-dd') as Date1
from TableName
因为
视图:就是一个SQL语句,他在查询的时候才执行。