[英]How to Overwrite Database Table Data Using SQL Server Data Tools
I'm currently working on a small project using sql data tools. 我目前正在使用sql数据工具进行一个小项目。 I'm getting data from excel sheet and write it back to my database table. 我从Excel工作表中获取数据,并将其写回到数据库表中。 from the database table I'm generating a report. 从数据库表中我正在生成一个报告。 Time to time I'm updating my excel sheet. 我不时更新我的Excel工作表。 but it won't update in my database table. 但不会在我的数据库表中更新。 how do I clear the table and rewrite excel sheet data to database table when run the project every time? 每次运行项目时,如何清除表并将Excel工作表数据重写为数据库表?
post build script would be how and when I would clear or synchronize the data. 构建后脚本将是清除数据或同步数据的方式和时间。 Then you have to write the truncate or delete and the insert and/or update sections to move data from your excel document to the sql table. 然后,您必须编写截断或删除以及插入和/或更新部分,才能将数据从excel文档移至sql表。 I would suspect that the SQL table is a better place to maintain the data though!!! 我怀疑SQL表是维护数据的更好地方!!!! If you maintain in SQL you can always have a query to see what it is in Excel at any given time and you don't have to worry about synching back to SQL. 如果您使用SQL维护,则始终可以在任何给定时间查询以查看Excel中的内容,而不必担心与SQL同步。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.