Icon View Incident Report

Minor Minor
Reported By: Polito Antonio
Reported On: 3/3/2012
For: Version 2.08 Build 3
# 3569 Type Mismatches in IFNULL Functions Can Cause #1011 Conversion Errors Instead of Proper #700 Error

If I run the following sql edb return me:

"ElevateDB Error #1011 An error occurred with the value (A conversion error occurred)"

Select
Minsan10,Descrizione, Giacenza_Totale, Prezzo_Fustello ,Prezzo_Rif ,
Prezzo_Imp1 ,Sconto_Val ,Sconto_Per ,INDICE_ROTAZIONE , Costo_Ultimo,
Fornitore_Ultimo_Acquisto,Data_Ultimo_Acquisto,
 
ifnull(Anno then 0 else Anno) as Anno ,
ifnull(Vmese1 then 0 else Vmese1) as Vmese1,
ifnull(Vmese2 then 0 else Vmese2) as Vmese2,
ifnull(Vmese3 then 0 else Vmese3) as Vmese3,
ifnull(Vmese4 then 0 else Vmese4) as Vmese4,
ifnull(Vmese5 then 0 else Vmese5) as Vmese5,
ifnull(Vmese6 then 0 else Vmese6) as Vmese6,
ifnull(Vmese7 then 0 else Vmese7) as Vmese7,
ifnull(Vmese8 then 0 else Vmese8) as Vmese8,
ifnull(Vmese9 then 0 else Vmese9) as Vmese9,
ifnull(Vmese10 then 0 else Vmese10) as Vmese10,
ifnull(Vmese11 then 0 else Vmese11) as Vmese11,
ifnull(Vmese12 then 0 else Vmese12) as Vmese12
from
trattati
Left join statisticheM on Trattati.minsan10 = statisticheM.minsan10



Comments Comments and Workarounds
The problem was this line:

ifnull(Anno then 0 else Anno) as Anno ,

The Anno column is a VARCHAR, so it should be this:

ifnull(Anno then '' else Anno) as Anno ,

However, EDB should be catching this and issuing a type mismatch error.


Resolution Resolution
Fixed Problem on 3/3/2012 in version 2.09 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image