SQL that created the error: SELECT splash_id, tbl_splash.swimmer_id, trim(firstname) as firstname, trim(lastname) as lastname, trim(preffirst) as preffirst, tbl_splash.team_id, trim(teamname) as teamname, meet_id, code_event_sex, date_swim, age_class, getsplitrec(splash_id) as splitrec_id, trim(time_text) as time_text, time_min, time_sec, time_hun, code_session, place, heat, lane FROM tbl_splash INNER JOIN tbl_swimmer USING (swimmer_id) INNER JOIN tbl_team USING (team_id) WHERE hide_swimmer = 'f' AND distance= AND code_event_sex='' AND code_stroke='' AND tbl_splash.meet_id=1435 ORDER BY code_session, inttime LIMIT 100 OFFSET 0;