How to name the labels

[expired user #11402]'s profile image [expired user #11402] posted 6 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 6 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").

[expired user #11402]'s profile image [expired user #11402] posted 6 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 6 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.

[expired user #11402]'s profile image [expired user #11402] posted 6 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 6 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".

[expired user #11402]'s profile image [expired user #11402] posted 6 years ago Permalink

Thank you!! good idea

vivekj's profile image vivekj posted 1 year 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.