Oracle 条件索引 case when 报错解决方案(APP)
文章目录
- 环境
- 文档用途
- 详细信息
环境
系统平台:Linux x86-64 Red Hat Enterprise Linux 7
版本:4.5
文档用途
本内容介绍 Oracle条件索引 case when 如何在HGDB中转换使用。
详细信息
1、oracle 索引
create unique index I_GL_VOUCHER_7 on gl_voucher(case when voucherkind<>2 then pk_accountingbook||pk_vouchertype||year||adjustperiod||num end);
2、在HighGO Database中执行报错
3、解决方案
转换为符合HighGO Database 语法的条件索引
create unique index I_GL_VOUCHER_7 on gl_voucher ( pk_accountingbook,pk_vouchertype,year,adjustperiod,num ) where voucherkind<>2 ;