Home » SQL & PL/SQL » SQL & PL/SQL » Merging two flat files
Merging two flat files [message #214473] Tue, 16 January 2007 11:36 Go to next message
vijaykasi
Messages: 11
Registered: January 2007
Location: London
Junior Member
Hello,

I have two target flat files generated from Informatica , can somebody let me know how to merge these two flat files into one(if possible a command, so that I can automate the job).

Thanks in advance
Vijay
Re: Merging two flat files [message #214474 is a reply to message #214473] Tue, 16 January 2007 11:37 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
cat file1 >> file2
Re: Merging two flat files [message #214475 is a reply to message #214473] Tue, 16 January 2007 11:39 Go to previous messageGo to next message
vijaykasi
Messages: 11
Registered: January 2007
Location: London
Junior Member
Pls suggest me other than CAT command
ex : cat file1 file2 > file3
Re: Merging two flat files [message #214476 is a reply to message #214473] Tue, 16 January 2007 11:44 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>Pls suggest me other than CAT command
NO.
Re: Merging two flat files [message #214478 is a reply to message #214473] Tue, 16 January 2007 12:09 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
For what purpose do you want them in one file? Without giving more information, I am just going to make my own guess.
You are using sqlldr and want to load the files, but all you have to do is just name both files in the control file. Problem solved.
Re: Merging two flat files [message #214675 is a reply to message #214473] Wed, 17 January 2007 07:58 Go to previous message
vijaykasi
Messages: 11
Registered: January 2007
Location: London
Junior Member
Found solution within Informatica.

Ans : On Target Flat File properties

Merge Partitioned Files :
Merge File Directory :
Merge File Name :

Thanks to all for your time and help.

Problem In detail :

In Informatica, I have 3 mappings , 3 source tables and 1 target flat file.

I have 3 different sessions for 3 mappings which inturn loads data into flat file, but when I execute 2nd and 3rd session it overwrites the first one, which leaves the result of last seesion(only) in my target flat file. My requirement was to append the 2nd and 3rd session result with the first one.

With above solution now I can define separate flat file names at each session and once the session run completes successfully it merges all the files into one defined in Merge properties on Target Flat File.


Previous Topic: Date Format
Next Topic: sql report creation
Goto Forum:
  


Current Time: Sat Dec 03 22:24:53 CST 2016

Total time taken to generate the page: 1.52047 seconds