Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Covid analysis creating table issue as final output generation issue #13

Open
DATA-Meta opened this issue Oct 18, 2022 · 2 comments
Open

Comments

@DATA-Meta
Copy link

Hi at 1:09:14, when creating a table, I have an issue
---- Temp Table

--Drop Table if exists #PercentPopulationVaccinated
--create table #PercentPopulationVaccinated
--(
--continent nvarchar(255),
--location nvarchar(255),
--date datetime,
--population numeric,
--new_vaccinations numeric,
--RollingPeopleVaccinated numeric,
--)

--insert into #PercentPopulationVaccinated
--select dea.continent, dea.location, dea.date datetime, dea.population, vac.new_vaccinations, sum(cast(vac.new_vaccinations as int)) over (partition by dea.location order by dea.location, dea.date) as RollingPeopleVaccinated
--from PortfolioProject..covidDeaths dea
--join PortfolioProject..CovidVaccinations vac
--on dea.location = vac.location
--and dea.date = vac.date
--where dea.continent is not null

--select*, (RollingPeopleVaccinated/population)*100
--from #PercentPopulationVaccinated

//////////////////////ERROR//////////
Msg 213, Level 16, State 1, Line 124
Column name or number of supplied values does not match table definition.

@Nazia815
Copy link

The minor errors which i can notice in this code are
1 - comma will not come in just before the closing parenthesis of create table
2 - in insert section dea.date** will be there instead of dea.date datetime

@DATA-Meta
Copy link
Author

Hi, Thank you Nazia for mentioning the corrections will do .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants