Solved

Append from Access to SQL failing on date fields.

Posted on 2011-03-09
3
353 Views
Last Modified: 2012-05-11
Hello,

I'm moving an Access database to SQL using the Wizard.  All the tables convert OK apart from two.  I've discovered it is related to date fields - if I copy the tables, remove all the date fields and then try it works fine.

I've tried migrating just the table structure and using an append query but this errors with an "Overflow" message.  Again if I do the same with the date fields removed it works.

Can anyone suggest a solution for this.

Thanks


0
Comment
Question by:Petermcg001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Expert Comment

by:devlab2012
ID: 35085103
in sql convert dates to a string in the format yyyy-mm-dd. In sql this format always works fine. Also, check between smalldatetime and datetime data types in sql server.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
ID: 35085119
So the problem is with he data values , not with the structure?

SQL Server ha a narrower range of acceptable dates than Access.  If you have dates in Access before 1753 these will not convert to sql server.  Access goes back to year 100.
0
 
LVL 1

Author Comment

by:Petermcg001
ID: 35085621
It was data related with some very silly dates in the table.  Feel pretty silly TBH!
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question