Supporting dynamic SQL generation for filling search records.