I have some inherited legacy language code snippets stored in a database table that I need to transform to a SQL like syntax so it can be used more effectively.
For example, one of the snippets is of the form
keyword = [a,b,c,x:y,d,e,f,p:q]
to indicate either discrete comma separate values or a range of colon-delimited values
How can I transform this to the equivalent SQL friendly snippet which would be
keyword in (a,b,c) or keyword between x and y or keyword in (d,e,f) or keyword between p and q
Thanks