SQL that produced the error: SELECT splash_id, tbl_splash.swimmer_id, trim(firstname) as firstname, trim(lastname) as lastname, tbl_splash.team_id, trim(teamname) as teamname, meet_id, code_event_sex, date_swim, age_class, trim(time_text) as time_text, time_min, time_sec, time_hun, code_session, place, heat, lane, getsplitrec(splash_id) as splitrec_id FROM tbl_splash, tbl_swimmer, tbl_team WHERE tbl_splash.swimmer_id=tbl_swimmer.swimmer_id AND tbl_splash.team_id=tbl_team.team_id AND tbl_swimmer.hide_swimmer = 'f' AND distance= AND code_event_sex='' AND code_stroke='' AND tbl_splash.meet_id= AND heat= AND code_session='' ORDER BY lane