Help with SQL Query to write data from one DB table to another for a monthly report

Another way to approach this problem, if you have access to SQL Server Management Server is to Create a View using the SQL QUERY provided by IRose without the WHERE And ORDER BY clause.
Then you can use a simple SELECT Query to access your data and the VIEW is reusable

You can look up the Syntax on docs.microsoft.com or in any SQL book but it is basically putting

Create View [dbo].[vViewName] as in front of your SQL statement

This eliminates the need for table C and rejoining the tables anytime you need to access the data
Matt

Hi,

Why you need to insert into third table C. You can make a query with A and B (Both tables are must fall in same database) , then show the result in your report, it is the easiest way I think.

Thanks.

After some testing, I was able to get it to work using your combined query and modifying it as needed. I appreciate the help and patience.