All Forums General
radsubra 33 posts Joined 10/12
05 Sep 2014
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.

Raja_KT 1246 posts Joined 07/09
05 Sep 2014

select cast(max(your_date) as date format 'YYYY-MM-DD') from your table;
in your bteq script after .export report file=your directory

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.