2.1.7 新发现BUG

Viewed 118

单独查询 这个视图 是可以的 hr_db.view_ods_employee_ehr_df 但是如果组合式图再去跟外部表查询是会报错的

      SELECT name,workcode,td_day,type
        from (
        SELECT 
name,WorkCode 
from
hr_db.view_ods_employee_ehr_df
where FirstRankDept ='股份本部' and EmployStatus ='在职' and SecondRankDept  not in ('高管','其他','退休人员')
        ) a
        cross join 
        (   
        SELECT 
CalendarDate td_day,
type
from
(
SELECT SUBSTR(CalendarDate,1,10) CalendarDate FROM jdbc_ehr_sqlserver_pro.dbo.CalendarDay
WHERE CalendarID = 1  and DateType = 120200000 and SUBSTR(CalendarDate,1,7)= SUBSTR(NOW() ,1,7)
) b
)a

错误如下

SQL 错误 [1054] [42S22]: errCode = 2, detailMessage = Unknown column 'PositionID' in 'jdbc_ehr_sqlserver_pro.dbo.a'

hr_db.view_ods_employee_ehr_df 也是基于外部表写的临时视图

2 Answers

2.1.6也有这个问题,bug是真的多,2.0还不会

@jasonf 你这个错误看着跟数据没有关系,只需要table的schema 就能复现,可以提供一下复现的schema 吗?