I have several independent chunks of SQL statements in one file. To run them, I highlight each chunk separately, run it, then copy the results and move to the next one.
I wonder if there is a way to run altogether and separate the results by a row like this:
Of course, each result will have different columns and headers but they will be separated by the above separators.
Is this possible? Or do you have any other way to run different independent statements together and produce the results in a formatted way?
By the way, can you propose a strategy to put a title to distinguish the results from each statement?
I was thinking to add a column with the title of the statement, i.e. [Statement 1]='Statement 1' so that I can easily see which result belongs to which statement but I think it is a bit messy.
I think the best would be to append a line at the top above the headers which will have the name of the query in the first cell and the rest cells to the right will be blank.
Any idea how I can do that without breaking the actual table of the results?