View Single Post
  #1 (permalink)  
Old August 12th, 2008, 09:55 AM
carumuga carumuga is offline
Authorized User
 
Join Date: Dec 2006
Location: chennai, tn, India.
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error - Loading date field from flat file to sql

Hi,

I have a column with the datetime datatype and trying to import the data from flatfile to sql server table. I'm getting the following error info.

An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Invalid character value for cast specification."....

I learnt in one of the blog that this could be reason probably where you have blank in the datefield column of flat file and the sql table can hold only NULL or valid date and it cannot accept blank.

In short, the flat file has a blank value for the corresponding sql server datetime column.

Pls. suggest if this is the known error, how to transform my data from flat file to sql server.

Thanks,
Chandra
__________________
Thanks,
Chandra
Reply With Quote