dbTalk Databases Forums  

Replacing Blank Strings with Nulls

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Replacing Blank Strings with Nulls in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Julian
 
Posts: n/a

Default Replacing Blank Strings with Nulls - 04-01-2004 , 08:55 AM






Hello,

I am copying a table from one sql server to another and
some of the columns are coming over as blank strings, I
want these converted to NULLS, but at the moment they come
over as blank strings, is there an easier way other than
doing a column by column activex transform to convert
these to nulls?

Thanks

Julian

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Replacing Blank Strings with Nulls - 04-01-2004 , 10:40 AM






Have a look at the NULLIF() function



--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


"Julian" <JulianPotter (AT) Hotmail (DOT) com> wrote

Quote:
Hello,

I am copying a table from one sql server to another and
some of the columns are coming over as blank strings, I
want these converted to NULLS, but at the moment they come
over as blank strings, is there an easier way other than
doing a column by column activex transform to convert
these to nulls?

Thanks

Julian



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.