根据日期插入记录 [英] insert records based on date

查看:88
本文介绍了根据日期插入记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我从XML文件中提取数据,这个xml文件会将记录插入到sqlserver表中。



所以,在这里,我想将所有以前的日期记录插入到今天的日期。



能帮助我吗。



谢谢

Hi everyone,

Iam extracting data from XML File, This xml file will insert records into sqlserver table.

So, here I want to insert all the previous date records to Till todays date.

Can you please help me.

Thanks

推荐答案

使用LINQ,获取小于给定日期的xml元素列表,然后将它们插入表中。



对于其他情况,您可以尝试 INSERT INTO SELECT - http://www.w3schools.com/sql/sql_insert_into_select.asp [ ^ ]。
Using LINQ, get the list of xml elements less than the given date and then insert them into the table.

For other scenarios, you could try INSERT INTO SELECT - http://www.w3schools.com/sql/sql_insert_into_select.asp[^].


这篇关于根据日期插入记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆