Does anyone know how to write a loop statement within a Teradata stored procedure? Here's what I'm trying to accomplish:
SELECT......
FROM......
WHERE CUST_NAME = 'AMY'
SELECT......
FROM......
WHERE CUST_NAME = 'JAMES'
...ETC.
I need to be able to run the same query for each customer (e.g. 10 customers), one at a time. Each resulting output dataset will then be inserted into a master table.
Tags:
Forums: