Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 problem import dbf into sql server using linkserve
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 12/23/2013 :  06:44:35  Show Profile  Reply with Quote
Msg 241, Level 16, State 1, Procedure copyDataToRipCategory, Line 4
Conversion failed when converting datetime from character string.
the type of dbf is: database timestamp [DT_DBTIMESTAMP]
the sql server destination is : datetime
this is my sql :

INSERT INTO [serverName].[database].[dbo].[L_category] select * from openquery(linkservername,'SELECT [cat],[catid],[date_time],[insertdate],[lname] from category')

the problematic field :::


destination field should be(datetime) : 2011-05-17 11:38:16.000
foxpro example field :17/05/2011 11:38:16

oren t

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 12/23/2013 :  09:46:53  Show Profile  Reply with Quote
May be issue with server settings

try converting it to iso formal first and then inserting
ie like

INSERT INTO [serverName].[database].[dbo].[L_category] 
select [cat],[catid],
from openquery(linkservername,'SELECT [cat],[catid],[date_time],[insertdate],[lname] from category')

SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000