Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Immediately exit a query if a condition is verified - response (11) by dnoeth

$
0
0

The numbering is based on whatever you want and 0001-01-01 was a monday.

SELECT CURRENT_DATE, (CURRENT_DATE - DATE '0001-01-01') MOD 7;

 *** Query completed. One row found. 2 columns returned.
 *** Total elapsed time was 1 second.

Current Date  ((Current Date-0001-01-01) MOD 7)
------------  ---------------------------------
  2013-07-25                                  3

Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>