Okay so what I am trying to do: Export the entire query to one excel file and then, from that excel file, export rows into different files based on a row condition. This way I don't have to run the SQL multiple times.
For instance, say I have this Excel output:
(columns A, B, C named Branch, Name, NumDays
Row 1: California, John, 10
Row 2: California, James, 2
Row 3: California, Tom, 4
Row 4: Denver, Mary, 5
Row 5: Denver, Paul, 4
Row 6: Rhode Island, Mark, 14
I want to be able to take that Excel file and create three files, Cali, Denver, and RI, with the same header as the source and the relevant rows ported over. Is there a good way to do this?