Hi,
I will try to explain my problem with example.
I have multiple sql-queries
Query-1
-----------
Select a, b, c, d From Table1;
Query-2
-----------
Select a, b, x, y From Table2;
Query-3
-----------
Select m, n, o, p From Table3;
Query-4
-----------
Select g, h, i, j From Table4;
Requirement
-----------------
I want to save/export the query results of each query in different text file (for example result set of query-1 in ABC.txt, result set of query-2 in XYZ.txt).
The format of exported data should be as shown below (Please check Format, Delimeter, encoding, etc)

I want to automate this thing, as I have may such sql queries and I have to do it for 700 projects(sql databases). I have tried something like "spool", but not able to export the data in required format.
Please help me, as it's very urgent.
Best Regards,
Priyank