I'm receiving this error: Error Code: 1292. Truncated incorrect INTEGER value: ''
I'm trying to create a temp table:
Create Table PercentPopulationVaccinated
(Continent varchar(255),
Location varchar(255),
Date Datetime,
Population Numeric,
New_vaccinations numeric,
RunningTotalofVaccinations numeric
);
insert into PercentPopulationVaccinated
select dea.continent, dea.location, str_to_date(dea.date, '%Y-%M-%D'),
convert(dea.population, signed int), convert(vac.new_vaccinations, signed int),
sum(cast(vac.new_vaccinations as signed))
over(partition by dea.location
order by dea.location ROWS UNBOUNDED PRECEDING) RunningTotalVaccinations
From CovidDeaths dea
join CovidVaccinations vac
on dea.location = vac.location
and dea.date = vac.date
-- where dea.continent is not null
order by 2, 3;
It creates the table but when I try to run the Insert into.. code it gives that error.
I think it's the data- these are the values of the two tables:
dea.continent - varchar (100)
dea.location - varchar (100)
dea.date - varchar (100)
dea.polulation - double
vac.new_vaccinations - varchar (100)