1

I have a table in SQL Server where I need to insert data on regular base. Each day I perform same task importing data manually, it makes me feel tedious so I need your help. Is it possible to send data from CSV file to SQL Server's existing table without doing manual procedure.

Or using python to create a scrip that send data from CSV file to SQL Server at fixed time automatically.

Dale K
28.1k15 gold badges60 silver badges86 bronze badges
asked Jul 6, 2021 at 6:28
7
  • 2
    So what have you tried so far? Commented Jul 6, 2021 at 6:32
  • Depending on what version of SQL Server you have (ie. is it Standard or Enterprise?), you could just have a SQL Agent job that runs the import. Either a simple SSIS package, or just a SQL command that runs a "bcp" - you could look into either of those options. (If, by chance, you're only running SQL Express, then using SQL Agent won't be an option for you. However, you could just run a Windows scheduled task with the "bcp") Commented Jul 6, 2021 at 6:32
  • Could you try to make a simple winform application? Commented Jul 6, 2021 at 6:41
  • I have sql Express version. Commented Jul 6, 2021 at 9:22
  • I have not tried for winform application. my task is to try to create something in sql server that perform this operation. Commented Jul 6, 2021 at 9:24

1 Answer 1

2

First you have to create a python script that inserts data into SQL server after reading CSV file. Then you should create a CRON job on your server that runs this script regularly. This might be a possible solution for your problem.

answered Jul 6, 2021 at 6:46
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.