Archives of the TeradataForum
Message Posted: Mon, 11 Nov 2002 @ 16:25:52 GMT
I am exporting a file and the following snippet of code is generating an error message:
, (CASE WHEN AL1.Itin_Cmpmt_Cd = 'C' THEN 'P' WHEN AL1.Itin_Cmpmt_Cd = 'F' THEN 'P' ELSE 'E' END AS "Cabin_Class") (CHAR(1))
I have attempted to do this without the parens, with Cabin_Class both in and out of single, double and even double single quotes.
I have even checked Chapter 4 of the Teradata EDBMS Performance Optimization manual without success.
I am getting the following error:
*** Failure 3706 Syntax error: expected something between the word 'Cabin_Class' and ')'. Statement# 1, Info =718 Input row number = 1 *** Total elapsed time was 0.00 seconds.
As a followup question, how do I refer to the alias in open code later in the process?
Is it Case < alias > or simply < alias >?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|