return error if no table is specified
avoid returning error when custom sql query is provided