create or replace view `自理能力评估视图` as SELECT `ehr_zlnlpg`.`ID` AS `ID`, `ehr_zlnlpg`.`GRID` AS `GRID`, `ehr_zlnlpg`.`TJID` AS `TJID`, `ehr_grjbxx`.`Name` AS `姓名`, `ehr_grjbxx`.`Sex
有时候我们需要对多个字段进行非空判断,显示几个字段中不为空(最前边)的那个,字段少的时候,我们可以使用CASE WHEN做判断,但是多的时候写起来就比较麻烦了,这时候我们可以用COALESCE,测试数据: --测试数据 if not object_id(N'Tempdb..#T1') is null drop table #T1 Go Create table #T
报错信息 org.apache.flink.table.api.ValidationException: SQL validation failed. From line 66, column 23 to line 68, column 46: Illegal mixing of types in CASE or COALESCE statement org.apache.calcite.run