question

Bhupendra99 avatar image
Bhupendra99 asked

Date Truncation in SSIS

We had two servers both using the same Table TechRecords I was assigned a task to keep the table in Sync in both server that is when a record inserted in server 1 the same should reflect in server 2 and vice -versa I am using an ssis which will take all records from TechRecords table in server 1 and push it to FTP and then SSIS scheduled on Server 2 will download file and insert in TechRecords and vice -versa my Issue is when I use datetime in where condtion SSis is truncating the Milliseconds part so I am not getting those records which were created in the gap of 1 minute Can anyone please suggest an alternative or how can I handle the truncation of the seconds
ssis
6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@SQLShark avatar image @SQLShark commented ·
This sounds a little like one of those examples where you have a hammer and everything looks like a nail. Have you looked at other methods to replicate the data? SQL Server can replicate this table with transaction replication to another database/server. http://msdn.microsoft.com/en-us/library/ms151198.aspx
2 Likes 2 ·
Bhupendra99 avatar image Bhupendra99 commented ·
I don't have any connectivity between these two servers SSIS package using the FTP is the only option I had
1 Like 1 ·
Binod avatar image Binod commented ·
Convert(DateTime, ?,121).
0 Likes 0 ·
@SQLShark avatar image @SQLShark commented ·
Are you exporting to a flatfile of Excel? Are you using SSIS for the export or something else (BCP etc). Are you transforming the data in anyway before you export?
0 Likes 0 ·
JohnM avatar image JohnM commented ·
To @SQLShark's point, how are you extracting the data? Would this solution work? http://www.rdacorp.com/2008/08/ssis-datetime-variable-truncates-milliseconds/ Can you use some other key to identify new records?
0 Likes 0 ·
Show more comments

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.