Tags for loop
Create Expiration Date based on next Date Value
I am looking to build and Effective Date and Expiration Date utilzing a customers next purchase date in the table without a do loop if possible as I do not have access to buid stored procedures. Below is an example of current data: ID          InvoiceDate ABC123  4/16/2015 ABC123  5/20/2015 ABC123  6/30/2015  
date recursive loop
How loop through table columns to determine distinct values
SELECT    vw_TPDDP.System_NME   ,vw_TDAD.Date_YYYY_FMT   ,vw_TDAD.Date_MM_FMT   ,vw_TPDDP.Company_CDE   ,SUM(vw_TPF.AMT) Amt FROM    vw_TDAD    INNER JOIN vw_TPF    ON (vw_TPF.Date_DIM_ID=vw_TDAD.Date_DIM_ID)    INNER JOIN vw_TPDDP    ON (vw_TPF.Profile_DIM_ID=vw_TPDDP.Profile_DIM_ID) WHERE    (  vw_TDAD.Date_YYYY_FMT  =  '2015'
loop stored procedure variable
3707 error when using recursive 'with' in stored proc in an attempt to concatenate a field.
Hello Using version 15, I am stuck with 3707 error: [5526] SPL1027:E(L417), Missing/Invalid SQL statement'E(3707):Syntax error, expected something like an 'END' keyword between ';' and the 'with' keyword.'. Line 417 is the termination semicolon for a recursive query trying to concatenate a field:
recursive loop 3707 error concatenate
Hi    Is there a way by which we can declare variables in a loop dynamically. I would like to create a vaiables like Var1,Var2,Var3....as and when a new loop begins. If the loop executed 4 times, four such variables has to be created. Kindly help me on this. Thanks.   Regards Arun
stored procedure DECLARE loop
Hi all, I want to acheive something which I scaled down to below sql,insert into t1sel 'annual',sum(a) from t2 where EOM_DT between '2013-10-01' and '2014-09-30';insert into t1
Use While loop in Stored Procedure in Teradata
Hi, I'm new to TeraData. Following is the script i am using to create to While loop in Stored Procedure. But TeraData Studio is giving me Syntax Error: can we use loop in Stored Procedure or is there any other way to do that. Kindly suggest. CREATE PROCEDURE proc (         IN i INTEGER,
teradata sql stored procedure while loop error
stored procedures with loop - queueing
Hi, Due to size of data (not to blow spool space) I need to chop that big dataset with cursor looping through X millions of rows.
stored procedure loop queueu
Ordered Analytical Functions: Translating SQL Functions to Set SQL
Many experienced SQL and procedure developers use SQL functions to perform common tasks and simplify their code narratives.
array cursor loop plsql set logic set sql sqlpl t-sql
Loop Statement in Teradata Stored Procedure
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.
Derived Tables with Ordered Analytical Functions to Translate Flat Logic
Ordered analytical functions enable parallel processing by freeing processes from flat logic. They also produce simpler Set SQL statements, which as a general rule can be expected to perform better than more complex Set SQL statements.
loop cursor set logic set sql array plsql t-sql sqlpl