sql server - SQL to find Invalid Dates -


Hi, I am trying to import some data access from SQL Server, however, when I run the import, I get this error.

  Herscelt: 0x80004005 Description: "Invalid date format." (SQL Server Import and Export Wizard)  

I have to try and solve it by using a script, so I do not need to correct all areas by hand - the question is What is a SQL that can do this?

OK, the error is clear, but if you find me then it is still unclear ... like these dates are wrong? Just in the wrong format? Just corrupt?

Post-text "itemprop =" text ">

Your question is a big obscure. I recommend that the data be loaded into a staging table in SQL Server. In this table, all column strings will be enough to keep the prices.

Then, to find the problems, For example, you can run:

  Choose date from the StagingTables where the date (date) = 0 The date is not zero;  

After you detect the problem, you can load something like this in the last table like this:

  In the refine (call 1, ..., coln), select col1, (case when col2 & lt; & gt; N / A 'then cast (2 as date 2) as the end 2. From StagingTable;  

Comments