anti-keseronokan (old)
Fun Stuff for Anti-Fun People
Tuesday, March 07, 2006
A Lump Of Stupidity
Okay, here I am making a linked server to an Informix database. I wanted to import data from a table through the linked server into a local SQL Server database. So I open the DTS Import/Export Wizard, do some clickety-click, next-next, and run. Then, some darned errors came up saying that some row can't be converted to the SQL Server DateTime datatype. Heck, the original column is Date (whatever that means in Informix). That should convert flawlessly right? Shoving in the error message into Google just led me to some unsolved problems of some poor souls like me. ------ Error at Destination for Row number 82745. Errors encountered so far in this task: 1. Insert error, column 16 ('nmp_prop_dt', DBTYPE_DBTIMESTAMP), status 6: Data overflow. Invalid character value for cast specification. ------ And then I figured if I just import it into plain text, then I can see the data, and check what's the problem. Okay then, ran the DTS Wizard again, this time output as CSV file. 1 hour, 36 minutes, and 51 seconds later, the darn thing completed. Owh yeah, file size 1,978,567 KB. There's some 1.7 millions row in there. How do you suppose to open that in a text editor! Notepad had simply refuse, too big for him. My trusty Notepad++ just died with runtime error. Excel only open it half-way until row 60000. But, come to think of it, how can you stuff 1.9 gigs into the RAM? Darn stupid. p.s: With help from a superior, using some Informix tools (that I dont know nothing about), came out that the problematic row is actually consisting of date value like "16/12/0097". Input error I guess. But that date is allowed in Informix, whereas SQL Server only allow date between January 1, 1753 through December 31, 9999. Now, what should I do. I don't know enough about DTS Wizard to alter the transformation script. Dang. Maybe I should just put the darn column into a binary(8).

2 Comments:
ya, I encouter the out of range date value before also when I was trying to download the renew data from informix. Those user simply input will create a lot of problem.
Alamak.. i should ask u lar.. would make my life a lot easier.. :P
Post a Comment
<< Home