RESET keyword in Teradata 12 Certification

Teradata Applications
Enthusiast

RESET keyword in Teradata 12 Certification

Any ideas why this is going wrong people? The following command in the T12 course notes is causing a syntax error:

SELECT Month_Of_The_Year, Sales,
SUM( Sales ) OVER (
ORDER BY Month_Of_The_Year
RESET WHEN sales IS NOT NULL
ROWS UNBOUNDED PRECEDING ) AS Last_Non_Null_Sales
FROM monthly_sales;

--error 3707: expect something like ")" between "Month_Of_The_Year" and "RESET"

------------------fyi----------------------------------

CREATE VOLATILE TABLE monthly_sales
(
Month_of_the_Year INTEGER NOT NULL
, Sales INTEGER
)
ON COMMIT PRESERVE ROWS;

INSERT INTO monthly_sales VALUES (1,4500);
INSERT INTO monthly_sales VALUES (2,4550);
INSERT INTO monthly_sales VALUES (3,4250);
INSERT INTO monthly_sales VALUES (4,4225);
INSERT INTO monthly_sales VALUES (5,NULL);
INSERT INTO monthly_sales VALUES (6,5124);
INSERT INTO monthly_sales VALUES (7,NULL);
INSERT INTO monthly_sales VALUES (8,5500);
INSERT INTO monthly_sales VALUES (9,4750);
INSERT INTO monthly_sales VALUES (10,4850);
INSERT INTO monthly_sales VALUES (11,5000);
INSERT INTO monthly_sales VALUES (12,5200);

SEL * FROM monthly_sales;

SELECT Month_Of_The_Year, Sales,
SUM( Sales ) OVER (
ORDER BY Month_Of_The_Year
RESET WHEN sales IS NOT NULL
ROWS UNBOUNDED PRECEDING ) AS Last_Non_Null_Sales
FROM monthly_sales;

--error 3707: expect something like ")" between "Month_Of_The_Year" and "RESET"
5 REPLIES
Senior Apprentice

Re: RESET keyword in Teradata 12 Certification

It's not from the TD12 course notes, this is TD13 syntax :-)

Dieter
Enthusiast

Re: RESET keyword in Teradata 12 Certification

This looks like an error in the online course then. In the ordered analytic functions it's one of the last topics. Shall I submit a bug request dnoeth?
Senior Apprentice

Re: RESET keyword in Teradata 12 Certification

If this a TD12 course, then it's a bug.

Dieter

Re: RESET keyword in Teradata 12 Certification

I had the same problem and it is now solved
________________
Read reviews of the http://www.moneytoplist.com affiliate programs and earn residual commissions

Re: RESET keyword in Teradata 12 Certification

hi rupert,

the syntax works very well in TERADATA 13.

So its not a error just nt compatible with earlier versions of teradata.