我有一个存储过程,我想在查找集中使用通配符搜索
AND IF(ipc IS NOT NULL,FIND_IN_SET(b.ipc_class_symbol, ipc),1=1));
ipc是varchar,比如“f03d,f02d”,等等,我想在“f03d%,f02d%”中搜索,它不会给出任何结果。如何解决这个问题?
djp7away1#
您可以尝试使用substr来截断 F03D% 至 F03D ```AND IF(ipc IS NOT NULL,FIND_IN_SET(SUBSTR(b.ipc_class_symbol,1,4), ipc),1=1));
F03D%
F03D
1条答案
按热度按时间djp7away1#
您可以尝试使用substr来截断
F03D%
至F03D
```AND IF(ipc IS NOT NULL,FIND_IN_SET(SUBSTR(b.ipc_class_symbol,1,4), ipc),1=1));