I think I'm having a similar issue as Sujjichalla. I am trying to get a simple select statement to run multiple times. I want to select a different department for which to select aggregate data on, and export to it's own Excel workbook. Is there a way for Teradata SQL to reference a separate list of Department names so as to satisfy the "Where" clause without me manually changing the query 20 times?
Example that I have so far:
in addition to the above sequence your string in WHERE Clause whould be enclosed in single qoutes, like this
WHERE Department = 'Adult Medicine'