0

I have a stored procedure I want to use Wildcard search in FIND_IN_SET

AND IF(ipc IS NOT NULL,FIND_IN_SET(b.ipc_class_symbol, ipc),1=1));

ipc is varchar like "F03D, F02D", etc I want to search in "F03D%, F02D%" which is not giving any results. How to solve this problem?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

0

You can try with SUBSTR to truncate F03D% to F03D

AND IF(ipc IS NOT NULL,FIND_IN_SET(SUBSTR(b.ipc_class_symbol,1,4), ipc),1=1));
flyingfox
  • 13,414
  • 3
  • 24
  • 39