I need to export some data into a file. The data are selected with a query that will often be made of multiple joins. I want the import operation to be as easy as possible. I was thinking of building an INSERT file with such a method: Oracle PL/SQL: Dump query result into file
But I am wondering if there is some tool already existing to export data based on a query. If this is the case, I might as well be happy with some binary file, as long as importing this file afterward is straight forward. I see there is exp, but it doesn't seem to really be able to handle queries, only basic WHERE clauses.