dbTalk Databases Forums  

Ignore NULL Values or Map NULL Values in DTS

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


Discuss Ignore NULL Values or Map NULL Values in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Ignore NULL Values or Map NULL Values in DTS - 10-20-2004 , 02:41 PM






Hi all,

I want to import Data from my ACCESS Mdb (NULL allowed) to my new SQLServer
2000 Database (NULLs NOT allowed).
The problem is that wenn my DTS-Packages is running I get an error that NULL
Values can't be inserted in my table.
Where can I place a Function or Script or something to convert the NULL
Values from my Access tables to Defaults in my SQLServer Tables?

Greetings

Martin



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

Default Re: Ignore NULL Values or Map NULL Values in DTS - 10-20-2004 , 02:55 PM






Why not do that as a SourceSQLStatement instead of specifying the tablename
as the Source ?


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Martin Schmeller" <martin.schmeller (AT) mcs-ag (DOT) com> wrote

Quote:
Hi all,

I want to import Data from my ACCESS Mdb (NULL allowed) to my new
SQLServer
2000 Database (NULLs NOT allowed).
The problem is that wenn my DTS-Packages is running I get an error that
NULL
Values can't be inserted in my table.
Where can I place a Function or Script or something to convert the NULL
Values from my Access tables to Defaults in my SQLServer Tables?

Greetings

Martin





Reply With Quote
  #3  
Old   
Martin Schmeller
 
Posts: n/a

Default Re: Ignore NULL Values or Map NULL Values in DTS - 10-21-2004 , 07:37 AM



Hi Allan,

thank you for answering!

you mean i should use IIF in an JET-SQL-Statement for the
OLEDB-Access-Source-Connection?
Something like this:
SELECT Number, IIF(ISNULL(Searchword),'',Searchword) AS Searchword,
IIF(ISNULL(Version),'',Version) AS Version FROM Version

to avoid NULL-Values to be inserted in my SQLServer-Dest.-Database!?

Greez

Martin



"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> schrieb im Newsbeitrag
news:OOEBR6ttEHA.1176 (AT) TK2MSFTNGP11 (DOT) phx.gbl...
Quote:
Why not do that as a SourceSQLStatement instead of specifying the
tablename
as the Source ?


--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Martin Schmeller" <martin.schmeller (AT) mcs-ag (DOT) com> wrote in message
news:OkweTwttEHA.220 (AT) TK2MSFTNGP15 (DOT) phx.gbl...
Hi all,

I want to import Data from my ACCESS Mdb (NULL allowed) to my new
SQLServer
2000 Database (NULLs NOT allowed).
The problem is that wenn my DTS-Packages is running I get an error that
NULL
Values can't be inserted in my table.
Where can I place a Function or Script or something to convert the NULL
Values from my Access tables to Defaults in my SQLServer Tables?

Greetings

Martin







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.