SELECT bsvs.flex_segment_value
FROM gl_legal_entities_bsvs bsvs,
hr_operating_units hr
WHERE 1 = 1
AND SYSDATE BETWEEN nvl(bsvs.start_date, SYSDATE - 1) AND
nvl(bsvs.end_date, SYSDATE + 1)
AND bsvs.legal_entity_id = hr.default_legal_context_id
SELECT bsvs.flex_segment_value
FROM gl_legal_entities_bsvs bsvs,
hr_operating_units hr
WHERE 1 = 1
AND SYSDATE BETWEEN nvl(bsvs.start_date, SYSDATE - 1) AND
nvl(bsvs.end_date, SYSDATE + 1)
AND bsvs.legal_entity_id = hr.default_legal_context_id