I would like to create two letters for a single person. One letter will be sent to a person’s old address and another will be sent to a person’s new address. Would this be two different reports with a slight variation in the SQL or is there a way to simply create both letters with a single report?
Share
In a normallized database, you would show the old address and new address in two separate records, perhaps in a related table linked by person ID or something similar. You should look up and read about normalization. Certainly you should aim for at least 3rd normal form.
For your current problem, you could create a unionized view
Then report on the values in the view.
You might want to have some more fields as well, such as the person’s name.
The fields you select in the first select statement must be the same number and type as those in the second select statement.
Also you can still add a where clause and an order by clause.
Check on the union operator online.
Hope this helps
Harv