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.
-
2So what have you tried so far?Raptor– Raptor2021年07月06日 06:32:02 +00:00Commented 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")Craig– Craig2021年07月06日 06:32:13 +00:00Commented Jul 6, 2021 at 6:32
-
Could you try to make a simple winform application?martin– martin2021年07月06日 06:41:51 +00:00Commented Jul 6, 2021 at 6:41
-
I have sql Express version.Padam Rai– Padam Rai2021年07月06日 09:22:15 +00:00Commented 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.Padam Rai– Padam Rai2021年07月06日 09:24:41 +00:00Commented Jul 6, 2021 at 9:24
1 Answer 1
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.