So I need to import some .csv file every day in our firm. My idea was to write a .bat file and run it everyday automatically through Task Scheduler. The problem is that i can't succeed at writting .bat file correctly. It's working when I type physically in CMD (sqlite3) but don't do anything when I transform it to .bat file and run it.
CMD:
C:WINDOWSsystem32>sqlite3.exe
SQLite version 3.34.0 2020-12-01 16:14:00
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> ATTACH DATABASE "C:...database.db" AS "name";
sqlite> .mode csv
sqlite> .separator ;
sqlite> .headers on
sqlite> .import "\\path\..." "dbname"
sqlite> SELECT * from "dbname"
The result is the way I want, so all the data is in the database correctly.
Do anyone has an idea how to transform this to a .bat file?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…