![]() |
|
![]() |
![]() |
Archives of the TeradataForumMessage Posted: Sat, 05 Sep 2009 @ 16:21:55 GMT
Teradata 13.0 permits "scalar subquery" so you could use syntax closer to what's in your post. Otherwise, you need to move the subquery to the FROM clause as a derived table expression, for example: Select L.* from Loan L CROSS JOIN (select day_of_week from sys_calendar.calendar Where calendar_date = current_date) D Where L.Application_Date between case when D.day_of_week <> 2 then current_date - 1 else current_date - 3 end And current_date -1;
| ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||