Duplicate results in Query

fbs

New member
Local time
Today, 23:26
Joined
Sep 7, 2000
Messages
8
Hi,

I have a query that is made up of 5 tables.
The primary key in each table is my company ID field. The query results are a formatted text file which I export to a text tab delimited file. I then import this text file
into a Quark Xpress template. The problem is that it creates multiple instances of the company name. As a work around I've been using a access report and doing a hide duplicates on the Company field, this only half helps me because if the data can not fit on one page it prints the company name on the following page with the corresponding data. The query results I am getting is this:
Comp CoNo
@OVERSEASDATA:ABB Lummus Global 1,
@OVERSEASDATA:ABB Lummus Global 10,
@OVERSEASDATA:ABB Lummus Global 12,
@OVERSEASDATA:ABB Lummus Global 21,
@OVERSEASDATA:ABB Lummus Global 25,
@OVERSEASDATA:ABB Lummus Global 27,
@OVERSEASDATA:ABB Lummus Global 30,
@OVERSEASDATA:ABB Lummus Global 47,
@OVERSEASDATA:ABB Lummus Global 48,
@OVERSEASDATA:ABB Lummus Global 51,
@OVERSEASDATA:ABB Lummus Global 53,
@OVERSEASDATA:ABB Lummus Global 55,
@OVERSEASDATA:ABB Lummus Global 158,

The results I need are this:

Comp CoNo
@OVERSEASDATA:ABB Lummus Global 1,
10,12,21,25,27,30,47,48,51,53,55,158,

I would appreciate any suggestions, Thanks
in Advance!
 
From what I see, you are not going to be able to get around this problem unless:

(a) You write a macro to run some VBA code that post-processes your query to a file, or

(b) The field that gives you "@OVERSEASDATA: ABB Lummus Global nnn" is split into two fields, "@OVERSEASDATA: ABB Lummus Global" and "nnn" as separate entities.

(Or a combination of the above.)

This approach might help you get closer to where you wanted to go.
 
Thanks very much for replying. I am not
experienced with writing VB code but I would be willing to try anthing if you could give me a sample syntax. As far as trying suggestion B) the Company Name and Country No.are 2 separate fields in two different tables joined by a Company ID. When I group on Company name I get the single occurance of Company, I've even created a sub-query that just pulls the country numbers, as soon as I join the company ID (primary key) I am back to square one. Your suggestion makes sense, I am just not sure how to go about doing it???
 

Users who are viewing this thread

Back
Top Bottom