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

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Text File to a Text File

Author  Topic 

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2009-01-23 : 14:20:35
Folks
I am getting a text files with 20 fields.
I have to clean it up and create an output of same exact nature.

The condition is if value in field 3 exists in database1.table1, I don't transfer that record to the destination file.

Can it be done or we must use text to a temp sql table to text?
Any help is welcome.
Regards
Paresh

Regards
Paresh Motiwala
Boston, USA

mfemenel
Professor Frink

1421 Posts

Posted - 2009-01-23 : 14:28:57
Lately I've been tinkering with Powershell and I know it could handle this. SSIS is another option for you. If you're doing bcp then I can't think of a way to do it and avoid the temp/staging table situation.

Mike
"oh, that monkey is going to pay"
Go to Top of Page

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2009-01-23 : 14:41:35
and I forgot to say, I already created a fully functional SSIS package for text-sql-text options.

I was hoping to do text to text.....

Regards
Paresh Motiwala
Boston, USA
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-24 : 12:58:27
quote:
Originally posted by pareshmotiwala

Folks
I am getting a text files with 20 fields.
I have to clean it up and create an output of same exact nature.

The condition is if value in field 3 exists in database1.table1, I don't transfer that record to the destination file.

Can it be done or we must use text to a temp sql table to text?
Any help is welcome.
Regards
Paresh

Regards
Paresh Motiwala
Boston, USA


you mean this?

http://www.sqlis.com/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
Go to Top of Page
   

- Advertisement -