![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
|
You're right. I should have read better. You wrote: Why this NULL <> 0? Null means the fields is undefined and has no value. '0' mean it has a value of '0'. You could add default values to the fields in the database for the fields having this problem. That will also solve it. But in ASA8 when i sum (1+null+2+3) i get 6. When i convert database to 10 i have big problem, because my aplication is hung up when in SUM exists NULL. Fantom Frank Fantom wrote: Why not use SUM(IsNull(Data,0)) that solves all the problems and warnings. I write in first post : i have thousends statement of this type. Fantom Frank Fantom wrote: SQLCODE 109 is merely a warning, not an error. The warning indicates that at least one NULL value of column "data" was read from the table and ignored in the computation of SUM. This warning was also present in ASA 8 servers, but the ODBC interface I use ODBC and aplication hang up when this type of statement is runing. would fail to pass that warning back to the application properly. That issue was fixed in a subsequent release. Now i use the newest 10.0.1.3579 and aplication not work ok (borland with ODBC and BDE) - no response and i must close aplication. In Sybase Central 10 i get warning on this statement. When i run aplication on 8.0.3 this aplication work properly. Fantom Glenn Fantom wrote: Hi when i want set SUM(data) and data sometimes is NULL and this statement return error (sqlcode = 109). Why this NULL <> 0 ? In ASA8 this is work. Now i tested this on ASA 10.0.1. Fantom ps. SUM(ISNULL(data, 0)) is work OK, but i don't want change all statements with agregate function in my aplication. -- Glenn Paulley Director, Engineering (Query Processing) iAnywhere Solutions Engineering EBF's and Patches: http://downloads.sybase.com choose SQL Anywhere Studio >> change 'time frame' to all To Submit Bug Reports: http://case-express.sybase.com SQL Anywhere Studio Supported Platforms and Support Status http://my.sybase.com/detail?id=1002288 Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere Developer Community at www.ianywhere.com/developer |
![]() |
| Thread Tools | |
| Display Modes | |
| |