Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Union Join two tables without SQL Command?

Status
Not open for further replies.

cazellnu

Technical User
Aug 15, 2002
41
CA
I need to create a report base on betrieve database(with native connection). It contains two tables (ModA and ModB)with exactly the same structure but different information.

Mod A has the following field:

Bin_ID Type Qty Weight
A1 Normal 30 225
A19 Normal 10 100

Mod B has the following field:

Bin_ID Type Qty Weight
B11 Normal 30 225
A17 Normal 10 2253

If BinID and Type are the index within both table, how can I create a report similar to the following:

Bin_ID Type Qty Weight
A1 Normal 30 225
A19 Normal 10 100
B11 Normal 30 225
A17 Normal 10 2253

I know that it is possible to do that by using Union Join comments:

SELECT [DATABASE_A.FIELD] FROM DATABASE_A
UNION SELECT [DATABASE_B.FIELD] FROM DATABASE_B

However, becasue I need to access the database throught the ddf file, I wonder if it is any possible alternative solution. Any suggestion will be greatly apperciate.
 
you cannot perform a SQL statement of any type through the .ddf files. You need to install btrieve/pervasive ODBC drivers and create ODBC data sources, then SQL will be available to you. Software Training and Support for Macola, Crystal Reports and Goldmine
251-621-8972
dgilsdorf@mchsi.com
 
You cannot link these tables by type since you have a many-to-many problem.

As long as you don't seem to want to sort the bins then you can do this with a subreport.

Create a main report that gets all the data you want from one table. Then in the report footer, place a subreport created similar to the main report except that you are using the second table. No linking is required...although things get a little tricky if you are passing parameters but then you would just link on the parameters which won't change during the report

Hope this helps Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top