DDQ task incorrectly replaces empty strings with null -
02-18-2005
, 02:08 PM
Is there a fix for this??? The same thing happens with updates as well as
inserts.
I found that empty strings are incorrectly replaced with null. For example:
use tempdb
go
create table [dbo].[Test_Source]
(
[Id] int not NULL,
[Field] varchar(255) NULL
)
go
insert into [dbo].[Test_Source] select 1, ''
insert into [dbo].[Test_Source] select 2, NULL
go
create table [dbo].[Test_Destination]
(
[Id] int not NULL,
[Field] varchar(255) NULL
)
go
create procedure [dbo].[Test_Destination_Insert]
@_Id int,
@_Field varchar(255) = NULL
as
insert into [dbo].[Test_Destination]([Id], [Field]) select @_Id, @_Field
go
-- Invoke a DTS package using DDQ Task.
select * from [dbo].[Test_Source]
select * from [dbo].[Test_Destination]
go
And I show Source as having 1/empty string and 2/NULL. My Destination table
has 1/NULL
and 2/NULL. |