Welcome to LQ and the Programming forum!
Please wrap your code and data snippets inside [CODE]...[/CODE] tags. Doing so will preserve indentation and provide other visual clues which make it easier for others to comprehend. You may write those yourself as shown, or use the
# button available with Advanced edit options. (A complete list of
BBCode tags is always available via a link near the bottom of every thread view).
I am unfamiliar with SQLPlus itself, but in general in SQL query syntax if you need to select records where some column has one of several values you might structure the query like this...
Code:
SELECT columns specification
FROM table specification
WHERE column_name IN(list of values)
So in your example...
Code:
WHERE ...
and d.FAILGROUP="$split". --- HERE I HAVE TO ADD ONE OF 3 VALUES AT A TIME. IT IS NOT WORKING
... would become...
Code:
WHERE ...
and d.failgroup IN($split_list)
... where
split_list would usually be a comma separated list of quoted values.
So you would probably need to change the value of your
split variable to be that comma separated, individually quoted list of values, something like
split = " 'FAILGROUP04','FAILGROUP05','FAILGROUP06' " (I have added extra spaces to make the quoting visible).