Hello,
I am not strong in creating complex queries and I am looking for assistance in creating a query that will insert values into a table based on the values of two other tables. All tables are in the same database. I'm also using SQL Server 2005.
Table #1
Table #2
These two tables are linked by simid and GICID.
The values are to be inserted into a new table structured as follows:
I am not strong in creating complex queries and I am looking for assistance in creating a query that will insert values into a table based on the values of two other tables. All tables are in the same database. I'm also using SQL Server 2005.
Table #1
Code:
SELECT projectid
FROM projects
WHERE simid > ''
'simid may contain nulls or 0
Table #2
Code:
SELECT GICID, BudgetCycleYear
FROM GICProjectData
These two tables are linked by simid and GICID.
The values are to be inserted into a new table structured as follows:
Code:
ProjectID (from Table#1)
GICID (from Table#2)
BudgetCycle (from Table#2)
Any help would be greatly appreciated.
Thank you in advance.
If at first you don't succeed, then sky diving wasn't meant for you!