Is it possible to append data to a single file using 2 different bteq scripts

Tools
Enthusiast

Is it possible to append data to a single file using 2 different bteq scripts

Hi,
I am trying to use the .export statements in a bteq scripts to spool data in a flat file.However i need 2 bteq scripts which will spool data to a single flat file and the data should not be overwritten. The data needs to be appended to the file

Thanks
Regards
Abhijeet
2 REPLIES
Enthusiast

Re: Is it possible to append data to a single file using 2 different bteq scripts

Are the structures the same so that you can just do a "UNION ALL" between the two queries?

That would be an easier approach if it works for you.
ac
Enthusiast

Re: Is it possible to append data to a single file using 2 different bteq scripts

Hi Abhijeet

You could also concatenate the two files after the scripts have been run, either from within BTEQ with the .OS command plus the relelvent syntax for your platform or outside BTEQ with a suitable command line tool.

Cheers,

Andy