Names of Tab from SQL Queries
I will run 3 - 7 queries all using the same base table for searching. The results is I get multple tabs with the same name on the tab.
Is there a way to have the tabs named something a little more useful?
Seeing something other than the table to let me know what it is, is more useful.
Password Check, URL with Email, Banned
"Currently the name of the tabs for a SQL query is the name of the table"
It just shows query#1 result#1 etc... by me!?
i'm messing something?
seems the name of snippet/or saved query, would be far more user friendly....clear and adjustable to more scenarios.
my 2 cents anyway...
Please read my above comment - I added the #2, #3 ... postfix for exactly that situation.
The name of the snippet or saved query would not help, as that is the same for all results, isn't it? You do not execute different snippets for each result grids. By the way, we're not talking about query tabs - what DB Phantom means is the tab captions of the result grids in one query tab. One query tab can have multiple result grids, one grid per result, e.g. if you exceute such queries at once:
SELECT * FROM table1; SELECT * FROM table2;
How about using the commenting text for example:
/* Report A */
SELECT * FROM table1;
/* Report B */
SELECT * FROM table1;
Now each result tab could be named: Report A, Report B.
/** * Monthly Sales Query * * @label Monthly Sales */ SELECT sum(*) AS total , month(sell_date) AS month FROM sales GROUP BY month; /** * Yearly Sales Query * * @label Yearly Sales */ SELECT sum(*) AS total , year(sell_date) AS year FROM sales GROUP BY year;
Please don't use my queries as example of good SQlJust indicating how the doc blocks could be used. It would genuinely be useful to me, and I'm sure others too
IMHO, creating a annotation syntax with its corresponding documentation, parser and use cases goes far beyond the abilities that are reasonable to expect from such a tool. I can't think of any other usage apart from running reports and if we want HeidiSQL to be a decent reporting tool it'll lack tons of other basic features.
If you need to run those reports regularly you should invest a few hours writing an application, possibly a PHP-driven web site or even an Excel spreadsheet.
Heidi is an excellent tool that I've been using for donkeys, but there's no single feature that makes it a killer app, but rather a collection of MANY small features that just makes it indispensable, IMHO. Being able to label the tabs in a multi-query is just another small feature that I'd love to have. It's hardly a deal-breaker, but it would make it much simpler to read the results. The alternative for me is to have the results contain a field that describes what I'm looking at (so making the beginning of the query SELECT 'YEARLY') for example. That sucks.
I came here because I was searching for a way to help me differentiate the different tabs.
See attached image example.
I have several Selects and the first one is from "vw_SomeView". Every tab is labeled "vw_SomeView" even though all of the other selects are from other tables.
I have a similar use case. I paste in a query that has 7 selects. If I can name the tabs then I can easily see what is what. Otherwise I have to check tab position against position of the select command. That's not too hard, but when mentally juggling other things it is a distraction.
I find HeidiSQL a very good tool and this would be a useful addition for me.
On HeidiSQL Help I see a solution, but my queries aren't as simple as the example.
I'm hoping I'm missing something.
Here's one of my queries: select from(select date(FROM_UNIXTIME(joinStamp-83600)) as date, count(*) from base_user group by 1 order by date DESC LIMIT 20 ) sub order by date ASC;
*I'm a new user, so I can't include the reference - so search google for: heidisql Screenshot: Multiresults
I was reading through the comments, hoping to find a solution to the problem of having multiple results tabs with the same name, though I don't see that this has been solved. So I'm commenting to show interest in a solution :)
joining in - yes, I agree this would be useful. Perhaps the app could continue as is with it's current naming but allow you to say double click a tab and give it a different name if you choose to..
Please login to leave a reply, or register at first.