David542
David542

Reputation: 110267

How to get max interval value?

In the BQ Docs on Interval, it says the max value is:

enter image description here

Is there a single way to input that value, or is it only possible by adding the three parts together, such as:

SELECT INTERVAL '10000-0' year to month + INTERVAL 3660000 day + INTERVAL 87840000 hour

enter image description here

Upvotes: 0

Views: 49

Answers (1)

David542
David542

Reputation: 110267

You can enter it in in the canonical format using the date unit range YEAR TO SECOND. For example:

SELECT INTERVAL '10000-0 3660000 87840000:0:0' YEAR TO SECOND

enter image description here

And you can easily see that is the max value then:

enter image description here

Upvotes: 1

Related Questions