Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Copy Data with different datatype

Author  Topic 

hammadrasheed
Starting Member

3 Posts

Posted - 2011-07-20 : 02:13:36
Hello;
i have a situation. i have Microsoft access files (Branchdb :) which I got from the branches, now I need to copy these file’s data into the SQL table named: ‘AllBranchesData’.
Microsoft Access file has the field which are mentioned below:

Branchdb:
=======================================================
Field Name Data Type
=======================================================
• MM Number
• YY Number
• ACode Number
• BookNo Text
• Invoice Number
• CCode Number
• PCode Text
• TDate Date/Time

AllBranchesData:

===========================================================
Field Name Data Type
===========================================================
• MM decimal
• YY decimal
• ACode decimal
• BookNo nvarchar
• Invoice decimal
• CCode decimal
• PCode nvarchar
• TDate datetime
• TQty decimal
• Bal int
• Amt float
Now when I am trying to copy data from Branchdb to AllBranchesData than it gives error about the data types mismatch, some data will loss if I continue to copy data.
Is there is a way to copy all the data in AllBranchesData using any query.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-07-20 : 03:23:59
Duplicate post http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=163248


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -