![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am using DTS to transfer data from an ODBC database to SQL server on a daily basis - all my transfers are working OK except for one. The problem with this one is that one of the input fields is a text field containing a number and the SQL server field is an int field. Among other thing I have tried using Clng in the data transformation but nothing I try works I get a type mismatch when the DTS runs. How can I correct this? Chris North Cotswold Computing *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
The field type in the ODBC table is Text(10) The value in the field is numeric - I am using a WHERE clause to check that no other records are passed. I enclose below my select code in case I have got it incorrect. select 'TRANSACTION_TYPE','ACCOUNT_NUMBER','REFERENCE_NUM BER','TRANSACTION_DATE ','HISTORY_DEPOT_CODE','UNIT_PRICE','DELIVERY_ADDR _CODE','QUANTITY','EXC HANGE_RATE','CURRENCY','ITEM_DISCOUNT_PCENT','ANAL YSIS','VALUE_AT_BUYING _PRICE','HISTORY_SPARE_NUMBER','HISTORY_BIN_NUMBER ','POSTED_DATE','THIS_ RECORD','PARENT_RECORD' from 'ACCOUNTING_SYSTEM'.'STOCK_HISTORY' where 'STOCK_HISTORY'.'REFERENCE_NUMBER' > '0' AND 'STOCK_HISTORY'.'REFERENCE_NUMBER' < '999999999' Chris North Cotswold Computing *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Allan Just to give you the background to this problem. The system started out three years ago, the data is transfered into an Access database each night and then during the day it is used to produce various reports. The data in some of the tables is now > 1.5m records hence the reason to migrate it to SQL server. I know that the reference_number field only contains a number and the ODBC routine has worked each night for the last three years. I have also checked the data with a query just in case. Chris North Cotswold Computing *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#8
| |||
| |||
|
#9
| |||
| |||
|
#10
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |