How can I create a UNION between 2 tables AND use the Parameters in the Where clause. I cannot use VIEWS, Crystal Queries, Temp Tables or Stored Procedures as this report is run within GoldMine and GM will only accept straight SQL.
Here is what I want to accomplish;
Select A.id, A.Name, A.State, A.Status, A.Zip from Table A
INNER JOIN Country on A.countryID = country.ID where
A.State = state.Parameter and
A.Zip = zip.Parameter and
A.Status = status.Parameter
UNION
Select B.id, B.Name, B.State, B.Status, B.Zip from Table B
INNER JOIN Country on B.countryID = country.ID wherewhere
B.State = state.Parameter and
B.Zip = zip.Parameter and
B.Status = status.Parameter
I am using CR 8.5
Here is what I want to accomplish;
Select A.id, A.Name, A.State, A.Status, A.Zip from Table A
INNER JOIN Country on A.countryID = country.ID where
A.State = state.Parameter and
A.Zip = zip.Parameter and
A.Status = status.Parameter
UNION
Select B.id, B.Name, B.State, B.Status, B.Zip from Table B
INNER JOIN Country on B.countryID = country.ID wherewhere
B.State = state.Parameter and
B.Zip = zip.Parameter and
B.Status = status.Parameter
I am using CR 8.5