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 | 900 (747) | Yacked2 |
» | Težava pri vnosu decimalnega števila v bazo (C#, Access)Oddelek: Programiranje | 978 (695) | nemonemo |
» | MySql Vprasanje - problem dupliciranih kljucevOddelek: Izdelava spletišč | 1449 (1271) | KernelPanic |
» | Mysql decimal stevilkeOddelek: Programiranje | 700 (594) | xandros |
» | visual basic 2008 express editionOddelek: Programiranje | 1826 (1253) | sel |