Bug #26258 In powerbuilder 5 User variables does not work with aggregate functions
Submitted: 10 Feb 2007 16:22 Modified: 28 May 2013 8:15
Reporter: Prashant Nirgun Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:3.51 OS:Windows (WindowsXP)
Assigned to: CPU Architecture:Any

[10 Feb 2007 16:22] Prashant Nirgun
Description:
I am using powerbuilder 5.0 and use following statment
Error Messagee :
SQLSTATE = S1T00
[MySQL][ODBC 3.51 Driver][mysqld-5.0.27-community-nt]FUNCTION veg.sum does not exist

Code : 

int it

select sum(item_id) into :It from item ;

if SQLCA.SQLCode = -1 then MessageBox("SQL error",SQLCA.SQLErrText,Information!)
messagebox("count",String(it))

How to repeat:
I tried this command in powerbuilder database administrator option without using into plane statement it works i tried max, min and sum all aggricated funciton fail when i try to stored result in variable.
[12 Feb 2007 10:43] Tonci Grgin
Not enough information was provided for us to be able to handle this bug. Please re-read the instructions at http://bugs.mysql.com/how-to-report.php

If you can provide more information, feel free to add it to this bug and change the status back to 'Open'.

Thank you for your interest in MySQL.

Explanation:
 - What is exact MyODBC version?
 - What connect string, with what options, is used?
 - Did you confirm with BO that their parameter substitution actualy works?
 - Please provide general query log from server at the time of error. I need to see what's getting to MySQL server.
 - Please provide ODBC DM trace so we can see the sequence of commands issued
 - I believe PB has it's trace too. If so, attach it to report.
 - S1T00 is "Timeout expired message", what is the native error code?

For things truly related to MySQL, please check http://dev.mysql.com/doc/refman/5.0/en/function-resolution.html.
[13 Mar 2007 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[28 May 2013 8:15] Bogdan Degtyariov
Can't continue without reporter feedback.
Closed.