Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Copy previous cell's value to current cell in CSV
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

KhD
Starting Member

6 Posts

Posted - 11/01/2012 :  02:46:56  Show Profile  Reply with Quote
Hi,

I am working on an SSIS package where I need to read data from a CSV file and insert into SQL table. But before I do that, I need to do some pre-processing on the file.

The CSV file looks like this:

3004891W,Chander Shekhar Sud,In Force
3022180P,Carole Margaret Hill,In Force
-,-,-
3022181I,James Allen Hill,In Force
-,-,-
N601635J,Spencer John Privett,Auto Pup
-,-,-

I have to replace the "-" with previous (one row above) cell value.
Can someone please suggest how to do this?

I am flexible with the approach. It can be a script task or using a temporary table to hold the data, and then processing that data in a Data Flow Task.

Thanks!!

KhD
Starting Member

6 Posts

Posted - 11/01/2012 :  05:06:51  Show Profile  Reply with Quote
Hi,

I found the answer in another forum:

http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/d84482a8-8192-49d6-99a8-9f5e8929c2b7

Thanks!!
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000