def _sql_constraint(obsHistIDList):
    """
    sql constraint to get OpSim pointing records for a list of obsHistID

    Parameters
    ----------
    obsHistIDList : list of integers, mandatory
        list of obsHistIDs of interest
    """
    sql_string = 'SELECT * FROM Summary WHERE ObsHistID in ('
    sql_string += ', '.join(map(str, obsHistIDList))
    sql_string += ')'
    return sql_string