I have a calculated query to return the next airings of a broadcast:
~ID = sched::ID_ProgType ;
~SQL = "select "StartTS"
where "ID_ProgType" = ?
and "StartTS" >= current_timestamp
order by "StartTS" asc" ;
~result = ExecuteSQL ( ~SQL; "|"; "¶" ; ~ID )
This gives me a list of timestamps which could contain 1000 rows and all I want is the first row/value.
I know I can use getvalue( ~result ; 1 ) in filemaker, but I suspect it would be better to have the SQL do it.