Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

How to name the labels

hector.bastien's profile image hector.bastien posted 5 years ago in General Permalink

Hello.

I was wondering if there is a way to name the labels on a multiple query result. I attach an image.

1 attachment(s):
  • Screenshot_2
ansgar's profile image ansgar posted 5 years ago Permalink

The tab captions get the name of the table name, if there is any. In all other cases they get automatically named ("Result x").

hector.bastien's profile image hector.bastien posted 5 years ago Permalink

The tab captions get the name of the table name, if there is any. In all other cases they get automatically named ("Result x").

But what can I do if I want to name the tab with "result X"? nothing? :(

ansgar's profile image ansgar posted 5 years ago Permalink

Correct, you can't rename it. But why would you want to do that? It's a temporary tab caption, nothing which gets stored afterwards.

hector.bastien's profile image hector.bastien posted 5 years ago Permalink

Correct, you can't rename it. But why would you want to do that? It's a temporary tab caption, nothing which gets stored afterwards.

Well... There is a report that has to be sent everyday and there are between 5 and 8 employees in charge of that but they have no idea about SQL. I give them the query and they only changes dates, copy and paste to excel and send it. The report has about 6 o 7 labels and they always have problems to remeber where to paste the info, I want to name the labels on Heidi and Excel with the same name to solve it.

ansgar's profile image ansgar posted 5 years ago Permalink

You could write the results to a named temporary table before selecting it:

CREATE TEMPORARY TABLE foobar SELECT ...;
SELECT * FROM foobar;

That would give the tab the caption "foobar".

hector.bastien's profile image hector.bastien posted 5 years ago Permalink

Thank you!! good idea

vivekj's profile image vivekj posted 3 weeks ago Permalink

I have another question based on the above solution, I am hitting multiple queries at a time so in that case, if I get the result name to customize, it would be really useful to us.

1 attachment(s):
  • Screenshot-from-2022-11-18-19-23-33

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.