Antonio E.
Antonio E.

Reputation: 359

How to check if filenames in specific folder are inside database table?

Start situation:

select filename from table1 
UNION 
select filename from table2;

I want to know if I have files not registered in the database tables.

Upvotes: 1

Views: 508

Answers (1)

A Modgil
A Modgil

Reputation: 290

You need to do couple of things:

  • Import the file with list of files into the database.
  • Use cursor to go through the list of file names and match it to your table list which contains the list-b of file names

To import file name you can use the import method or directly read the file as a table virtually.

Thanks

Upvotes: 1

Related Questions