|
Archives of the TeradataForumMessage Posted: Thu, 28 Aug 2003 @ 17:00:50 GMT
Doug Cox wrote:
Just try to format anything with a SUBSTRING(...FROM...) or EXTRACT(...FROM...) Before: , sum( case when ( EXTRACT(YEAR FROM l_shipdate) * 100 + EXTRACT(MONTH FROM l_shipdate) ) = ( EXTRACT( YEAR FROM (CURRENT_DATE-1) ) * 100 + EXTRACT( MONTH FROM (CURRENT_DATE-1) )) then l_extendedprice else 0 end ) After Ctrl-Q: , sum( CASE WHEN ( EXTRACT(YEAR FROM l_shipdate) * 100 + EXTRACT(MONTH FROM l_shipdate) ) = ( EXTRACT( YEAR FROM (CURRENT_DATE-1) ) * 100 + EXTRACT( MONTH FROM (CURRENT_DATE-1) )) THEN l_extendedprice ELSE 0 END ) Or Subqueries or ... This is just a dumb tokenizer which inserts a CR/LF plus Tabs after some keywords (at least you can get rid of those when you modify keywords.txt). I really don't know why they don't use a Parser, because they already have one for Teradata SQL ;-) Dieter
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | |||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | |||||||||||||||||||||||||||||||||||||||||||||||||||