Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Crazy Dates
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Titre:
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01428522
Message ID:
01428536
Vues:
36
Thanks, I will try. Hopefully the error will also go away since some of the 'numbers' seem to be out of range or something.


>I get these csv files that I need to import into SQL Server. The first column is a DateTime column in a decimal format. The csv file is basically two columns: datetime every 15 seconds of a particular date, and a flot value for a reading.
>
>Well, I found a couple of issues:
>
>Using 40093.8333:
>If I paste this into Excel and format it as Date I get 10/7/2009 7:59:57 PM
>If I do SELECT CAST(40093.8333 AS DATETIME) in SQL 2008 I get 2009-10-09 19:59:57.117
>Out of these two the correct datetime is the Excel datetime
>
>Further, if I try to import the file into SQL 2008 to a new table, created by the import, using the Management Studio Task -> Import Data into a database and setting the datatype property for that column to date [DT_DATE] (also tried DT_DBDATE) I get the following error:
>Messages
>Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Time" returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
> (SQL Server Import and Export Wizard)
>
>Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "output column "Time" (10)" failed because error code 0xC0209084 occurred, and the error row disposition on "output column "Time" (10)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
> (SQL Server Import and Export Wizard)
>
>Any help or insights are greatly appreciated.
>
>Thanks,
>-R!
Ricardo A. Parodi
eSolar, Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform