Forum Discussion
merge queries
- 8 years ago
If you specify the "Join Kind" as Full Outer, you should get all rows from both tables when performing a Merge statement.
But there is a difference between a Merge statement and what you are describing (if I understand correctly). With a Merge statement you are combining queries based on matching rows. With Append you are combining queries based on matching columns.
So I think that you should try an Append Queries As New. So your tables of 1000 and 100 rows, will return a result set of 1100 rows, as you desire. The number of columns for each query must be the same for each query, so for the appending you will use the same columns from both querys.
Append requires columns to be exactly similar to work in best condition. if columns in source queries are different, append still works, but will create one column in the output per each new column, if one of the sources doesn’t have that column the cell value of that column for those rows will be null.
Append is similar to UNION ALL in T-SQL. It will not remove duplicated. Then you have to use Group By or Remove Duplicate Rows to get rid of duplicated.
- Anonymous8 years ago
Thank you. Append Queries worked!
If you specify the "Join Kind" as Full Outer, you should get all rows from both tables when performing a Merge statement.
But there is a difference between a Merge statement and what you are describing (if I understand correctly). With a Merge statement you are combining queries based on matching rows. With Append you are combining queries based on matching columns.
So I think that you should try an Append Queries As New. So your tables of 1000 and 100 rows, will return a result set of 1100 rows, as you desire. The number of columns for each query must be the same for each query, so for the appending you will use the same columns from both querys.
Append requires columns to be exactly similar to work in best condition. if columns in source queries are different, append still works, but will create one column in the output per each new column, if one of the sources doesn’t have that column the cell value of that column for those rows will be null.
Append is similar to UNION ALL in T-SQL. It will not remove duplicated. Then you have to use Group By or Remove Duplicate Rows to get rid of duplicated.
- Anonymous8 years agoNot applicable
Thank you. Append Queries worked!
- MauriceMecowe8 years agoResolver II
Perfect, could you please mark my previous reply as the solution. thank you!