How to insert records to your Microsoft SQL Server database using Python

preview_player
Показать описание
In this Python tutorial, we are going to learn how to insert records to your tables in Microsoft SQL Server.

► Buy Me a Coffee? Your support is much appreciated!
-------------------------------------------------------------------------------------
☕ Venmo: @Jie-Jenn

► Support my channel so I can continue making free contents
---------------------------------------------------------------------------------------------------------------

#SQLServer #Python
Рекомендации по теме
Комментарии
Автор

For those facing the error "[Microsoft][ODBC SQL Server Driver][SQL Server]String or binary data would be truncated in table", the data set has since grown and to fix this just increase Traffic_Report_Id to NVARCHAR(255)

Absolutely amazing video, another informative banger from Jie Jenn.

jacobbardwell
Автор

Nice, Worked exactly how I wanted it to work. This video has opened my eyes about dbs, mdls. This is the best tutorial I have ever watch in 2021( in 2 hours it will be 2022)

quickkcare
Автор

Thank you so much for the video! Was struggling to get it to work, and this worked great!

jamescaldwell
Автор

Very nice presentation style. Easy to follow and understand. Keep up the good work!

daveoatway
Автор

hey you are amazing, if i have data in excel file can i do the same?

amitvaishnav
Автор

👍Thank you for your tutorial. I have learned a lot from this video.
But I have a question. How can I use SQL raw query to execute.

subratasadhukhan
Автор

if I have a dataframe, do you think I need to convert it to a list of list in order to use your method? records object is a list that have lists as elements.

Chris_BC
Автор

Hey JJ, thank you for your tutorial. I learned a lot from you. I am now trying to do some web scraping and insert the results into Microsoft SQL. Yet, I failed and I have no ideas how should I correct the codes. Can you give a helping hand ?

youtubefatbe
Автор

can we store the insert statements in a .sql file and call them using pyodbc ?

surendarsakthivel
Автор

Hi thanks for your simple and awesome explanation.
I have an issue with output from Sql Server using python, the output prints with paranthesis, quotes and coma as shown below:
(11, 'Habeeb', 'ali', 'dfkjds', 'ldjflj', 'Your First Pet Name', 'raju', '1234')

can we change the output to this:
11 Habeeb ali dfkjds ldjflj Your First Pet Name raju 1234

yourownparamour
Автор

I don't make bulk insert SQL Server with Python. How can I do it?

oguzkrcicek
Автор

how to check if that data is already present

chaitraashok