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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combining like files 1

Status
Not open for further replies.
Dec 5, 2001
18
US
I have multiple files of the same data. The files were created by software that seperated companies by files rather than codes in a record. For example the Employee master file (empmstr) is EMPMSTR01 for company #01 and EMPMSTR02 for company #02.

Is there a way to temp combine these files before processing?

If not can feilds by accumulated even though they are found in dif files?

Thanx for the assistance.

Hugh
 
If you use Crystal SQL designer, grab all the individual files and doa UNION query. Then write your crystal report against the Query file. Software Support for Macola, Crystal Reports and Goldmine
dgillz@juno.com
 
thanx, I will try to see if I am able to use the sql query.

However, will I be able to add a new field to each record so I can keep each company unique. In other words, I want to add a company field to to each record to identify from which company (file) it originated from.
 
one more request. I know how to use the sql designer, but how does one do a "union query". I only know how to use the expert dialog. I am not a programmer and thereby unfamiliar with the sql languare. The expert does not give you a option for union inquiry.

In summary:


How to use a sql union query
how to query the actual file name and to create a new field in each record to identify which file this record actually came from.

Many thanx!!!!!!
 
Here's a general layout of the SQL query you need to write:
----------------------------------------------
SELECT x, y, z, "01" as Company FROM EMPMSTR01
WHERE...
UNION ALL
SELECT x, y, z, "02" as Company FROM EMPMSTR02
WHERE...
UNION ALL
SELECT x, y, z, "03" as Company FROM EMPMSTR03
WHERE...
----------------------------------------------

Cheers,
- Ido



ixm7@psu.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top