Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Append from Access to SQL failing on date fields.

Posted on 2011-03-09
3
Medium Priority
?
371 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
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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Viewers will learn how the fundamental information of how to create a table.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

916 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