|
Archives of the TeradataForumMessage Posted: Mon, 10 Nov 2003 @ 18:50:32 GMT
Hi Craig: You are on the right track, just didn't go far enough. Try this: SELECT CAST( (date (FORMAT 'MMDDYYYY')) AS CHAR(8)), date FROM branch; Just wondering, what is branch? People familiar with Oracle know that they need a FROM and it provides a pseudo table called dual. From the output you showed, it would appear that branch is a table with one row in it. Since date is a reserved word in Teradata, the FROM is not needed. You can also write a query to return a single output with today's date as: SELECT CAST( (date (FORMAT 'MMDDYYYY')) AS CHAR(8)), date; /* explicit CAST */ and SELECT (date (FORMAT 'MMDDYYYY'))(CHAR(8)), date; /* implicit CAST */ Hope this helps, Michael Larkins
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||