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

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии •

  • @jacobbardwell9195
    @jacobbardwell9195 Год назад +2

    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.

  • @jamescaldwell7923
    @jamescaldwell7923 10 месяцев назад

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

  • @quickkcare605
    @quickkcare605 2 года назад

    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)

    • @jiejenn
      @jiejenn  2 года назад

      Glad the video helped.

  • @barefootalex
    @barefootalex 3 года назад

    Another home run. Thanks Jie!!!!

    • @jiejenn
      @jiejenn  3 года назад

      Glad my video helped.

  • @daveoatway6126
    @daveoatway6126 4 года назад +1

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

    • @jiejenn
      @jiejenn  4 года назад

      Glad my video helped. And thanks for the coffee!

  • @subratasadhukhan2161
    @subratasadhukhan2161 Год назад

    👍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.

  • @kennethstephani692
    @kennethstephani692 3 года назад

    Excellent video!!

  • @stephc4050
    @stephc4050 3 года назад

    This is amazing ! Thank you!

  • @amitvaishnav9004
    @amitvaishnav9004 3 года назад

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

  • @youtubefatbe9982
    @youtubefatbe9982 3 года назад

    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 ?

    • @jiejenn
      @jiejenn  3 года назад

      Probably not at the moment. Too many things to catch up.

  • @Chris_87BC
    @Chris_87BC 3 года назад

    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.

    • @jiejenn
      @jiejenn  3 года назад +1

      pndas already has a built-in method to convert a dataframe to a nested list. For example, df.values.tolist()

  • @tobiassartori6749
    @tobiassartori6749 3 года назад

    the best ever omg

  • @surendarsakthivel38
    @surendarsakthivel38 3 года назад

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

    • @jiejenn
      @jiejenn  3 года назад

      You can open the sql file and read the sql statement first, then pass the system to pypyodoc.

  • @yourownparamour
    @yourownparamour 3 года назад

    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

    • @zarakikenpachi722
      @zarakikenpachi722 3 года назад

      Yes, just convert it to a list, and then join it with a space in-between

  • @joeweber4976
    @joeweber4976 3 года назад +1

    how to create a table from python ?

  • @oguzkrcicek1401
    @oguzkrcicek1401 3 года назад

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

  • @hasanfahad5292
    @hasanfahad5292 Год назад

    Make a video on Pymssql

    • @jiejenn
      @jiejenn  Год назад

      I will look into it.

  • @Martswitch
    @Martswitch Год назад

    How to update sql db from python

    • @jiejenn
      @jiejenn  Год назад

      UPDATE [tbl] SET column = [value]

  • @chaitraashok1956
    @chaitraashok1956 2 года назад

    how to check if that data is already present

    • @jiejenn
      @jiejenn  2 года назад

      I would export the records to a temp table first in SQL Server, then write a SQL query to compare the records to insert the ones do not exist.

    • @chaitraashok1956
      @chaitraashok1956 2 года назад

      @@jiejenn Thank you !!