Skip to content
Advertisement

Tag: firebird-3.0

Select closest maximal numeric value in Firebird

Imagine there’re 2 tables, let’s call them “Master” and “Detail”: There’re 2 input parameters: list of Master IDs (master_id_list) and numeric value (num_value). For every ID in master_id_list I should get one Detail record: If num_value < MIN( f_value ), it should be the record with MIN( f_value ) If num_value > MAX( f_value ), it should be the record

Advertisement