One Record Per File, with Reformatting
Hello, I think this might be simple (or not). I have a table where each record has two columns that I care about: A userId and a comma-delimited list of dates. Here are two sample rows of data (each row has two columns): JCMartin 12-13-2011 08:12:43,08-19-2009 21:17:52,02-14-2010 16:34:19 RWills 11-13-2006 07:12:45,03-26-2011 19:17:37 For each row I need to create one text file whose first line is the user id and subsequent lines are the individual dates, without the timestamps. The first record above should result in a file like this: JCMartin 12-13-2011 08-19-2009 02-14-2010 What's more, each file name should be based on the user id (e.g., JCMartin.txt). Frankly, I'm not sure where to start. I have a data flow but I'm not sure what transform(s) to use, or if a data flow is even appropriate. I'm really at a lost for the best approach. Could someone offer some direction? Thanks
November 9th, 2011 7:48pm

I would suggest running the data flow through a Script component. With that component, using either C# or VB, you can create a file based on the record (i.e. JCMartin.txt) and call the Split method of the string containing the comma-delimited dates to generate a list. You can then output the username and then the list of dates created by the Split method call. This will happen for each record coming through the data flow.
Free Windows Admin Tool Kit Click here and download it now
November 9th, 2011 10:20pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics