|
Archives of the TeradataForumMessage Posted: Tue, 14 Aug 2012 @ 13:29:10 GMT
<-- Anonymously Posted: Tuesday, August 14, 2012 04:00 --> Dear All, I want to export files .csv using ?bteq, with naming the file filename_date.csv The date will be selected from a table, I checked on the web and I found that I have to create two bteq scripts like below: The bteq couldn't open and catch the variable from mydate.ksh So the file name is ${mydatex} which is wrong First bteq .logon ${LOGON}; .export report file='mydate.ksh' select 'export mydatex=FNAME_'||CAST(DATE AS DATE FORMAT 'YYYYMMDD')||'.CSV'? (title '') FROM TABLE; .export reset .exit Second bteq I created another bteq : .LOGON ${LOGON}; .SET FORMAT OFF; .OS rm -f ${mydatex}; .export? file = ${mydatex}; CALL proc(1,2,3); .export reset; .quit; Thank you for helping
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||