Forum » Programiranje » MYsql: Error: Incorrect decimal value: '' for column '' at row -1
MYsql: Error: Incorrect decimal value: '' for column '' at row -1
BRBR ::
update mt join g on g.term = mt.term and mt.src = '' and g.`key` = 'hardiness' and g.value <> 'null' set mt.usda_min = (case when g.value like '%a' then cast(g.value AS DECIMAL(10,2)) when g.value like '%b' then (cast(g.value as DECIMAL(10,2)) + 0.5) else cast(g.value as DECIMAL(10,2)) end) , mt.src='x' where mt.usda_min > (case when g.value like '%a' then cast(g.value AS DECIMAL(10,2)) when g.value like '%b' then (cast(g.value as DECIMAL(10,2)) + 0.5) else cast(g.value as DECIMAL(10,2)) end)
Incorrect decimal value: ''
ok če bi updatal '', pa ga ne
for column '' at row -1 ?
- spremenil: BRBR ()
OracleDev ::
V takih primerih greš vedno lepo po vrsti. Preveri če ti select dela. Recimo probi to, lahko da sm se zatipku.
Prever kaj vrne in da je povsod "decimal" tam kjer mora bit.
Prever kaj vrne in da je povsod "decimal" tam kjer mora bit.
select case when g.value like '%a' then cast(g.value AS DECIMAL(10,2)) when g.value like '%b' then (cast(g.value as DECIMAL(10,2)) + 0.5) else cast(g.value as DECIMAL(10,2)) end x from mt join g on g.term = mt.term and mt.src = '' and g.`key` = 'hardiness' and g.value <> 'null' where mt.usda_min > (case when g.value like '%a' then cast(g.value AS DECIMAL(10,2)) when g.value like '%b' then (cast(g.value as DECIMAL(10,2)) + 0.5) else cast(g.value as DECIMAL(10,2)) end)
Vazelin ::
zakaj selectaš prazno vrednost? Ti select ne dela samo na enem naboru podatkov ali na drugem naboru?
BRBR ::
at row -1
Kje je ta vrstica ? Ni je. Nobenga recorda ne najde za update. Malo je čuden message, oz. moralo bi biti 0 rows updated.
Zgodovina sprememb…
- spremenil: BRBR ()
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | VB.NET evklidov algoritem razširjenOddelek: Programiranje | 885 (732) | Yacked2 |
» | Težava pri vnosu decimalnega števila v bazo (C#, Access)Oddelek: Programiranje | 956 (673) | nemonemo |
» | MySql Vprasanje - problem dupliciranih kljucevOddelek: Izdelava spletišč | 1426 (1248) | KernelPanic |
» | Mysql decimal stevilkeOddelek: Programiranje | 685 (579) | xandros |
» | visual basic 2008 express editionOddelek: Programiranje | 1801 (1228) | sel |