BTEQ export to flat file

General
Enthusiast

BTEQ export to flat file

Hi,

I want to do BTEQ export to flat file .

I have a sql which gets the max(date) from table a. I want to store this max date in a file in the following format

max_date = '2014-09-04'

Is this possible in BTEQ export?

Thanks.

1 REPLY
Enthusiast

Re: BTEQ export to flat file

select cast(max(your_date) as date format 'YYYY-MM-DD') from your table;

in your bteq script after .export report file=your directory