dbTalk Databases Forums  

Data Pump task for varying number of source column

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


Discuss Data Pump task for varying number of source column in the microsoft.public.sqlserver.dts forum.



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

Default Data Pump task for varying number of source column - 10-16-2006 , 04:39 AM






Hi,

I am trying to load a text file into a table using the data pump task.
The source file can have up to 16 columns but may have less. I always
want to take all the columns and I am sure there must be a way to check
whether a column exists before loading it? I assume there's something
that can be written in Activex along the lines of

Function Main()

IF EXISTS DTSSource("Col015") THEN
DTSDestination("col15") = DTSSource("Col015")

ELSE
DTSDestination("col15") = NULL
END IF


Main = DTSTransformStat_OK
End Function

I've tried IsEmpty and IsNULL with no success. Is there a way to
determine whether a column in the source file exists simply?

Thanks


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.