On Thursday, May 21, 2020, postgann2020 s <postgann2...@gmail.com> wrote:
> > SELECT seq_no+1 INTO pair_seq_no FROM SCHEMA.TABLE WHERE (Column1 like > '%,sheath--'||cable_seq_id ||',%' or Column1 like 'sheath--'||cable_seq_id > ||',%' or Column1 like '%,sheath--'||cable_seq_id or > Column1='sheath--'||cable_seq_id) order by seq_no desc limit 1 ; > > > Could you please suggest a better way to execute the query > Add a trigger to the table to normalize the contents of column1 upon insert and then rewrite your query to reference the newly created normalized fields. David J.