SQL query question - tricky one I have two tables, one with a single payment information and an id (LFN), on the other hand there are payment positions:
single payment:

payment positions:

goal is to get a table like this:

with our_recno there is one match, through customer id i can find all associated positions. I do this with a subquery. The best solution I get is this:

Do you have an idea how I can repeat the LFN Number instead of getting NULL?
Thank you very much for your ideas.
You have to build a bridge, which you should already have, so you should think about your design
The only useful and not redundant information that has the table payment is LFN and to be honest put this into the payment_positions, every information you want you can get from payment_positions then:
CREATE TABLE [payment] (
  [LFN] INTEGER,
  [OUR_RECNO] INTEGER,
  [TOTAL] FLOAT
);

INSERT INTO [payment]
  ([LFN], [OUR_RECNO], [TOTAL])
VALUES
  ('1234', '36622016', '71.89');
GO 

1 rows affected

CREATE TABLE [payment_positions] (
  [OUR_RECNO] INTEGER,
  [CUSTOMER] INTEGER,
  [TOTAL] FLOAT
);

INSERT INTO [payment_positions]
  ([OUR_RECNO], [CUSTOMER], [TOTAL])
VALUES
  ('36617800', '2566303', '47.34'),
  ('36622016', '2566303', '10.51'),
  ('36625936', '2566303', '14.04');
GO

3 rows affected

SELECT [CUSTOMER],[OUR_RECNO] 
FROM [payment_positions] 
WHERE [OUR_RECNO] IN (SELECT [OUR_RECNO] FROM [payment] ) 

CUSTOMER | OUR_RECNO
-------: | --------:  
 2566303 |  36622016

SELECT r.[LFN], ac.[OUR_RECNO], ac.[CUSTOMER], ac.[TOTAL]
FROM [payment] AS r
INNER JOIN 
(SELECT [CUSTOMER],[OUR_RECNO] FROM [payment_positions] WHERE [OUR_RECNO] IN (SELECT [OUR_RECNO] FROM [payment] )) AS t1
ON r.[OUR_RECNO] = t1.[OUR_RECNO]
INNER JOIN [payment_positions]  AS ac
ON ac.[CUSTOMER] = t1.[CUSTOMER]

 LFN | OUR_RECNO | CUSTOMER | TOTAL
---: | --------: | -------: | ----:
1234 |  36617800 |  2566303 | 47.34 
1234 |  36622016 |  2566303 | 10.51 
1234 |  36625936 |  2566303 | 14.04

db&lt;&gt;fiddle here