Error - Loading date field from flat file to sql
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.