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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Importing data using DTS
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 03/20/2007 :  09:50:24  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
Howard writes "I have raw data in a flat file that has blanks that I'd like to be considered NULLs in the SQL server database.

I am hoping that there is a very simple way to do this.
I do not want to check each field for a blank first.

A similar problem is that sometimes a numeric field might have bad data, say a character somewhere. Is there a simple way to convert the bad data into a NULL automatically?"

Constraint Violating Yak Guru

366 Posts

Posted - 03/20/2007 :  21:10:54  Show Profile  Reply with Quote
It would probably be easier and faster if you import the raw data into a staging table first. Then you can use SQL statements to do your conversions. Trying to do conversions during the import can be messy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000