Archives of the TeradataForum
Message Posted: Wed, 30 Apr 2008 @ 17:50:30 GMT
Subj: | | Re: Retrieving the Second Highest Amount |
|
From: | | Michael Larkins |
Hi again Megan:
I didn't mention your requirement for the correct date range via a WHERE. That is because I think you would be handling it in your select from
the view.
You could build the WHERE into the view, however you would have to replace the view each time the date range changed. Instead of a view, you
could parameterize a macro with a start date and end date to provide a "floating" range. Then you program/tool would do the EXEC command instead
of a SELECT and pass the two dates.
Regards,
Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor
|