With DTS, you can transform the data before it gets imported. That's the
'T' in 'DTS'. When moving an Excel spreadsheet to SQL Server, there is a
place in DTS where you select the worksheet from the Excel file. At this
location, there is a Transform button. You can do simple
transformations, or you can use VB code to do more complex
transformations.
HTH,
Brain
[quoted text, click to view] Benny wrote:
>
> I use DTS import/export wizard to import the data from the Excel file.
> So is there any ways to replace the NULL fields with empty string
> beside using query to update the fields to empty string?
>
> Erland Sommarskog <sommar@algonet.se> wrote in message news:<Xns93C0EFC135FA3Yazorman@127.0.0.1>...
> > Benny (cs_benny@hotmail.com) writes:
> > > I am performing a data import on the SQL server. Due to fact
> > > that I use the excel file as a source. Some of cells in excel are
> > > actually empty, they become NULL fields after importing into the SQL
> > > server. Actually I want these fields are empty string instead of NULL.
> > > Does SQL server has any approach to make these fields to be empty
> > > string instead of NULL when importing?? Or is there any store
> > > procedure exist for converting the fields to empty string?
> >
> > Since I don't know how you import the data, I can't really say what
> > you could do in that end.
> >
> > Once the data is in SQL Server, you can say:
> >
> > UPDATE tbl
> > SET col = ''
> > WHERE col IS NULL
--
===================================================================
Brian Peasland
dba@remove_spam.peasland.com
Remove the "remove_spam." from the email address to email me.
"I can give it to you cheap, quick, and good. Now pick two out of