Archives of the TeradataForum
Message Posted: Thu, 27 Feb 2003 @ 20:46:42 GMT
Subj: | | Re: How do I get values into a BTEQ script w/o an IMPORT file? |
|
From: | | Michael McIntire |
Why not instantiate a volatile table with the dates on it, then execute the remaining statements or macros against it - either serially
or in a multi-statement request?
Bteq < myvt.from_date and thedate <
myvt.to_date
; Select * from ABC where thedate > myvt.from_date and thedate <
myvt.to_date;
.quit
EOF
If you are trying to timestamp a bunch of functions (esp when they run over the midnight boundary) - the method I use for batch systems,
is that I have a init script, which logs on to the database, fetches the date, writing it into a file. When I exit the script, I load the
date into a global variable and reference it throughout the remainder of my KSH scripts. ${LOADDATE}
Sam - catch me on IM for more details.
|