Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Loop Statement in Teradata Stored Procedure - forum topic by cklam

$
0
0

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: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>