question

pyguypy avatar image
pyguypy asked

How to create a Payment Forecast Profile in SQL

I have this table with a number of header records, how can I use SQL to generate insert statements that will populate another table with a projected forecast profile for each customer based on the term but restricted to the start date and end date. For example Customer ID 2255689 should have a projected profile as shown.

1/11/2020 = 210,000

1/02/2021 = 210,000

1/05/2021 = 210,000

1/08/2021 = 210,000


1/11/2021 = 210,000

1/02/2022 = 210,000

1/05/2022 = 210,000

1/08/2022 = 210,000


1/11/2022 = 210,000

1/02/2023 = 210,000

1/05/2023 = 210,000

1/08/2023 = 210,000

t-sql
1605637583901.png (8.6 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.