When there are multiple candidate columns that can be inferred to be the timecode column, the USING TIMECODE clause provides a way to disambiguate which to use; for example, when there are joins between PTI tables. If the USING TIMECODE clause is not specified in ambiguous cases, an error is reported.
Example: USING TIMECODE Clause with Multiple Candidate Columns
The example shows explicitly specifying the USING TIMECODE clause in a join:
select avg(b.temperature) from ocean_buoys_seq a , ocean_buoys_seq b group by time(minutes(100)) using timecode(a.td_timecode);
Example: Invalid Example with Ambiguous Multiple Candidate Columns
The example shows that the timecode is ambiguous without specifying the USING TIMECODE clause in this join:
select avg(a.temperature) from ocean_buoys_seq a, ocean_buoys b group by time(minutes(100)); *** Failure 4359 Time Series: Timecode specification is ambiguous.