dbTalk Databases Forums  

Problem with DTS and Null Records

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


Discuss Problem with DTS and Null Records in the microsoft.public.sqlserver.dts forum.



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

Default Problem with DTS and Null Records - 08-21-2006 , 04:08 PM






I am trying to produce a result that includes only records with a
Status of "A".

The DTS Package is as follows:

Function Main()

If Instr(DTSSource("Col001"),"A") > 0 Then
DTSDestination("ACTIVITY-STAT") = DTSSource("Col001")
end if
Main = DTSTransformStat_OK
End Function

This generates a table with 824 rows and 306 of them are "A", The
remaining 518 are nulls. Apparently it's doing the job, but including
the rows it skips. Any suggestions to avoid appending null rows
appreciated!!!

RBollinger


Reply With Quote
  #2  
Old   
Charles Kangai
 
Posts: n/a

Default RE: Problem with DTS and Null Records - 08-21-2006 , 09:28 PM






Function Main()
If Trim(DTSSource("Col001")) = "A" Then
DTSDestination("ACTIVITY-STAT") = DTSSource("Col001")
Main = DTSTransformStat_OK
else
Main = DTSTransformStat_SkipRow
end if
End Function



"robboll" wrote:

Quote:
I am trying to produce a result that includes only records with a
Status of "A".

The DTS Package is as follows:

Function Main()

If Instr(DTSSource("Col001"),"A") > 0 Then
DTSDestination("ACTIVITY-STAT") = DTSSource("Col001")
end if
Main = DTSTransformStat_OK
End Function

This generates a table with 824 rows and 306 of them are "A", The
remaining 518 are nulls. Apparently it's doing the job, but including
the rows it skips. Any suggestions to avoid appending null rows
appreciated!!!

RBollinger



Reply With Quote
  #3  
Old   
robboll
 
Posts: n/a

Default Re: Problem with DTS and Null Records - 08-22-2006 , 07:06 AM



I knew it had to be simple. Thanks.
Charles Kangai wrote:
Quote:
Function Main()
If Trim(DTSSource("Col001")) = "A" Then
DTSDestination("ACTIVITY-STAT") = DTSSource("Col001")
Main = DTSTransformStat_OK
else
Main = DTSTransformStat_SkipRow
end if
End Function



"robboll" wrote:

I am trying to produce a result that includes only records with a
Status of "A".

The DTS Package is as follows:

Function Main()

If Instr(DTSSource("Col001"),"A") > 0 Then
DTSDestination("ACTIVITY-STAT") = DTSSource("Col001")
end if
Main = DTSTransformStat_OK
End Function

This generates a table with 824 rows and 306 of them are "A", The
remaining 518 are nulls. Apparently it's doing the job, but including
the rows it skips. Any suggestions to avoid appending null rows
appreciated!!!

RBollinger




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.