Verification of file name with table column

I am trying to generate code

  1. move entire list of file names with specific pattern(standard patterned name for example file name is <process>_<country>_<yymmdd>) in a directory to a variable
  2. Use variable in netezza code to check file name exist in a table or not?
    for example: Employee table with file name as col1, file_upload as flag
  3. If exists turn flag 'Y' else default as 'N'

For us to be able to help you much, we need a lot more detail.

  1. What have you tried to far?
  2. Show us some small, representative sample input files. And, show us the (exact) output you want to produce from those sample input files.
  3. What is netezza ?
  4. What operating system are you using?
  5. What shell are you using?