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.
| Author |
Topic |
|
mattd_nz
Starting Member
6 Posts |
Posted - 2004-07-06 : 22:52:52
|
(Moved from the general section )HelloWe are currently moving from using dbase/foxpro to MS SQL Server. I have tried to import data using DTS; I have an ODBC connection to the dbf file (with a dbase VFP driver), and the data seems to import ok.However there were several null values in fields of type datetime the import process has populated these fields. When I use the query analyzer I get1899-12-30 00:00:00.000when I look in Enterprise manager I see 12:00:00 a.m.But what I want to see is <null>.Any ideas where to start - google hasn't come up with the exact answer yet.CheersMatt |
|
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-07-06 : 23:07:06
|
| Looks like the import process is replacing NULL with zero.Maybe the FP ODBC driver is subbing nulls with zeroes. A good way to find out is to open the DTS Transform Data task and do a preview of the data from the 'Source' side. This should show you what's going on. You may need to modify your source query to replace the zeroes with nulls. Alternatively, you can do the substitution with an ActiveX Copy task in the Transformations section. This gives you the flexibility to do whatever processing you want before the data is written to the destination table. Another way is to run a DML query on the data after you've done the import: UPDATE table SET datefield TO NULL WHERE datefield = 0But this could cause more problems, particularly if zero is a valid date in your applications....HTH,Tim |
 |
|
|
|
|
|