<kaiq@realtyideas.com> writes:
> seems we'll fall below the bottom line: even regular expression can not
> work here. Since "-" can be anywhere, no easy way out.
Sure you can do it with a regular expression ... it's ugly but you can
do it:
where partno ~ 'L-?M-?7-?4-?1-?C-?N-?S-?G-?S'
or possibly
where partno ~ 'L-*M-*7-*4-*1-*C-*N-*S-*G-*S'
if you need to allow multiple consecutive dashes. '-?' means 0 or 1
dash, '-*' means 0 or more dashes...
regards, tom lane