I gave up trying to do this is a single SQL statement and went over to writing
a stored procedure.
Unfortunately I get stuck here too.
This function gets me the data I need from tables accounts_new, account_ranges
and salesunits.
CREATE OR REPLACE FUNCTION fnc_test (
INOUT p_dataareaid account
I'm having trouble getting the values I want from my tables.
Below you find the DDL's for all tables concerned and some data to test with.
What I would like to get as a result is: for each billing_exact record the
salesunit from account_ranges
if there is a match between billing_exact.lineamount