On Sat, 2012-11-03 at 05:07 -0700, abbat wrote:
> 
> Hi,
> 
> How to create request SUM
> 
> $Query = "SELECT Phones"
> $Phone = $Result!Phone  - works
> 
> 
> 
> $Query = "SELECT Sum(Column)"
> 
> $Sum =$Result!" Sum(Column)"  - not works
> $Sum =$Result!Sum(Column)  - not works
> 
> Thanks
> 


Working a bit in the dark here abbat, but 
without an indication of the rdbms, try

$Query = "SELECT Sum(Column) as kangaroos"
$Sum = $Result!kangaroos

or 
$Sum = $Result["kangaroos"]


I doubt that $Result!Sum(Column) could ever work
and I'm pretty sure that no rdbms in the known 
universe would ever succeed with
$Sum =$Result!" Sum(Column)".

In the latter case, think 
$Sum=$Result!a_result_field_that_does_not_exist

In the former case, think
$Sum=$Result!now_I_want_you_to_go_back_and...
_recompute_an_entirely_different_result_field.

:-)
Bruce





------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to