0 - 18 of 18 tags for recursive

I'm looking to consilidate rows in my table by combining similar consecutive rows together. 
In the example I have category "A" where the type "X" is the 1st two rows in order of START_TS. I need those two rows to combine with the start_TS from the 1st row and the END_TS of the second row. The other two rows would remain the same.

WITH RECURSIVE RECTBL(child_ID, child_nm, Parent_ID, Parent_NM, LVL)AS
( SELECT CHILDid, childname, PARENTID, parentname, 0 AS lvl 
FROM WDM_S_WCIS_GEN_S1.HIERARCHY 
WHERE CHILDid = 1
AND SNAP_EFF_DT = CURRENT_DATE - 1

UNION ALL 
SELECT CHILDid, childname, PARENTid,  parentname,
RECTBL.LVL + 1 
FROM RECTBL

Normally when you define a column and give it an alias you can reference it in calculating another column:

Hi All,
I have a unique situation in that I have the following scenario:
Cust      UID     Txn Amount      Running Sum Amount            indicator
1            a             10                        10                                      0

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
 

Hi, 
I am new to the recursive query. I was practicing on some sample data collected from the Internet. Here is my code: 

Hi All 
I have require to list down the lineage for a particular table as below:

Source --> Target1

Target1 --> Target2

Target1 --> Target 3

Target2 --> Target 4

 

 

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:

My data looks something like this:
table1:
ID | Line | Code
1 | 1 | a
1 | 2 | b
2 | 1 | d
2 | 2 | e
2 | 3 | f
 
table2:
Code | Name
a | alpha
b | beta
d | delta
e | epsilon
f | phi
 
A common join brings the following results:
ID | Line | Name

Hi Guys,
 
i'm using 'With Recursive' to fetch required result set, i need to insert this result set into another table. Please let me know how we can do this.
I tried below syntax, but it's not working, 
with recursive <recursive_name>
(select column list)
as
(
select * from seed table

Hello,
This question is a spinoff of the following thread:
http://forums.teradata.com/forum/database/concatenate-value-of-multiple-rows-into-one-single-row-1#comment-133576

I have a table to be updated having 3 columns ext_JobGroupCd,ext_JobCd,ext_OrderIngroup

Hello
I'm trying to run this recursive query but it's giving me an error:

I am pretty new to teradata and know some basic SQL but I find that I am struggling with this problem.
 

Yesterday our DBA's completed the update of our Teradata test environment to version 14.

Hello,  Can someone help me with a Recursive SQL problem.  I am new to teradata and I know Recursive SQL is a more advanced function.  I'm trying to concatenate all the holiday dates on one line and my query runs but it never stops :).  Any Ideas?

 

 

WITH RECURSIVE Holiday (HOLIDAY_IND, Dates, level) AS

(

Hi,

 

I need to traverse a "Relationship Table" using a "Recursive Query". An example follows. My actual business problem is far more complicated than this example. However, the required logic should be similar to the following.