"Ungültiges Datumsformat" beim Import von flat-file-Import-Assistenten

Guten Tag,

Ich habe ein dilemma, dass ich nicht herausfinden. Ich bin versucht, zu importieren einer flachen Datei in eine SQL-db-Tabelle, aber habe Probleme. Meine Spalte in SQL ist eine Datum-Zeit-Spalte für das Geburtsdatum Geburtsdatum. Die Extraktion flat-file zur Verfügung gestellt hat mir diese Spalte als Datum...also, wenn ich importin auf SQL bin ich immer:

Messages
Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 10.0"  Hresult: 0x80004005  Description: "Invalid date format".
 (SQL Server Import and Export Wizard)

Error 0xc020901c: Data Flow Task 1: There was an error with input column "DOB" (212) on input "Destination Input" (147). The column status returned was: "Conversion failed because the data value overflowed the specified type.".
 (SQL Server Import and Export Wizard)

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "input "Destination Input" (147)" failed because error code 0xC020907A occurred, and the error row disposition on "input "Destination Input" (147)" 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)

Ich versuche, herauszufinden, wie man eine random time 00:00:00.000 zu jedem Geburtsdatum in der flat-file. Beispiel, schicken Sie mir 1983-11-30 aber ich will 1983-11-30 00:00:00.000

Gibt es eine Möglichkeit, dies zu tun, oder hat jemand eine Idee was ich tun kann? Vielen Dank im Voraus

  • Dies sollte kein problem sein (zumindest nicht die, die Sie denken). Ein DATETIME Spalte wird automatisch angenommen, dass die Zeit 00:00:00.000 wenn es erhält nur ein Datum. Das wahrscheinlichste Problem hier ist Pfingstmontag, der Datum format, SQL-Server kann vorausgesetzt werden, dass das format für Ihr Datum YYYY-DD-MM statt YYYY-MM-DD
  • Versuchen Sie SET DATEFORMAT ymd vor dem ausführen der bulk insert.
  • Danke....Ich denke, dass meine Probleme woanders liegt...ich lief einfach durch mit dem format bleiben die gleichen und es 0 vorausgesetzt ist, wie Sie dachte. Danke
Schreibe einen Kommentar