簡體   English   中英

Mysql 工作台錯誤代碼:1292。截斷不正確 INTEGER 值:'​​'

[英]Mysql workbench Error code: 1292. Truncated incorrect INTEGER value:''

我從這個代碼中得到錯誤代碼 1292 你能告訴我如何解決它嗎?

我只是想制作臨時表

create table percentpopulationvaccinated (
continent varchar(255),
location varchar(255),
date datetime,
population numeric,
new_vaccinations numeric,
People_Vaccinated numeric
);

Insert into percentpopulationvaccinated
Select death.continent, death.location, death.date, death.population, vac.new_vaccinations, 
sum(convert(vac.new_vaccinations, signed int)) over (partition by death.location order by death.location, death.date) as People_Vaccinated
from coviddeaths as death
join covidvaccinations as vac
    on death.location = vac.location
    and death.date = vac.date;
-- where death.continent is not null
-- order by death.location, death.date

select *, (People_Vaccinated/population)*100
from percentpopulationvaccinated;```

請參閱此答案:截斷不正確的 INTEGER 值

這不是錯誤。 當您要求將非數字轉換為 integer 時,這是來自 CONVERT() 的警告;

convert(vac.new_vaccinations, signed int)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM