简体   繁体   English

如何使用SQL Server数据工具覆盖数据库表数据

[英]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.

相关问题 如何在SQL Server中将表的数据从database1复制和覆盖到database2 - How can I copy and overwrite data of tables from database1 to database2 in SQL Server 如何使用SQL Server将表和数据从一个数据库复制到另一个数据库 - How to copy table and data from one database to another database using SQL Server 如何在SQL Server数据库中存储表数据? - How can I store table data in SQL Server database? 如何从SQL Server中的另一个数据库中选择表的数据? - How to select data of a table from another database in SQL Server? 如何在SQL Server数据库表中使用X和Y网格坐标选择数据圆? - How can I select a circle of data using X and Y grid coordinates in a SQL server database table? 如何修复SQL Server数据工具中的OLE DB错误 - How to fix an OLE DB error in SQL Server Data Tools 如何在Visual Studio中更改Sql Server数据工具编辑器中的连接 - How to change the connection in Sql Server Data Tools Editor in Visual Studio 如何使用php,jquery和ajax将数据插入SQL Server数据库 - How to insert data into SQL Server database using php, jquery and ajax 如何使用django将数据更新到sql数据库中的表中 - how to update data into table in sql database using django 如何使用Java SQL将数据类型插入到数据库表中 - how to insert into database table with different data types using Java SQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM