distal-attribute
distal-attribute
distal-attribute
distal-attribute

select [expression]

User, date Message
Written by Igreh
3 years ago
Category: Running SQL scripts
6 posts since Tue, 13 Dec 11
Is it possible to get result of expression in query like "SELECT 1+1". Expecting result is "2" smile
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Yes, of course, the server is able to do math expressions. Just try it. Other examples:

SELECT POW(2, 32);
SELECT 60 * 60 * 24;
SELECT RAND();


You can browse function names via rightclick in a query editor > "Insert function" > "Numerical functions" etc.
Written by Igreh
3 years ago
6 posts since Tue, 13 Dec 11
It works, but where is the result?
All I see is:

SELECT POW(2, 32);
/* 0 rows affected, 1 rows found. Duration for 1 query: 0,000 sec. */

Written by jfalchMoney, Euro
3 years ago
382 posts since Sat, 17 Oct 09
in the results pane, immediately below query input area, where all SELECT results are shown.
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Hehe, I guess you did enlarge the query editor down to the bottom so you just don't see the grid. Please check that.
Written by Igreh
3 years ago
6 posts since Tue, 13 Dec 11
WTF...
I just can't find the results pane. Where is it hides from me? happy
prooflink http://imm.io/epT1
Written by jfalchMoney, Euro
3 years ago
382 posts since Sat, 17 Oct 09
normally, there should be a results pane directly below the query pane, above the log pane; cf http://imm.io/eqLF. If this is not the case, the most possible explanation is, as anse said, that the query pane has been made so much larger that the results pane is completely hidden by it. try to click and hold mouse button on the lower border of the query pane; if the mouse pointer turns into a two-headed vertical arrow, drag upwards; this should make the results pane re-appear.
if this should not work, i think you could ask anse for some registry magic, to reset pane sizes to "factory defaults".
Written by ansgar
3 years ago
4940 posts since Fri, 07 Apr 06
Exactly - you can start regedit.exe, go to

HKEY_CURRENT_USER\Software\HeidiSQL


and delete the value "querymemoheight".
Written by Igreh
3 years ago
6 posts since Tue, 13 Dec 11
Thanks, anse!
It works now )
 

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