Combining multiple records of same types into one record

Combining multiple records of same types into one record

Post by MCol » Thu, 10 Oct 2002 22:12:26



I have a database of products owned by customers the problem is each product
own has it1s own record. Example:

Company A might own 6 different products and hence they are listed as 6
different records.

How can I combine all records into one so that company A is listed once in
the database yet all the product they own are included in that record ?

Any help greatly appreciate.

If I am too confusing sorry, email me and I1ll try to explain it better

MC

 
 
 

Combining multiple records of same types into one record

Post by Michael Stou » Thu, 10 Oct 2002 23:26:09


This is the way the database should be set up. There should be 1 record for
each product. If you want to display all Products that belong to a Company.
Then create a relationship from your file where the Company records are kept
to the Products database.

Use Company::Company fields (hopefully this is an ID) and then set up a
portal in the file that contains the records for each Company. What you will
get is a list of all Products that belong to that Company.

--
Michael Stout

http://www.fmpdev.com/

Quote:> I have a database of products owned by customers the problem is each product
> own has it1s own record. Example:

> Company A might own 6 different products and hence they are listed as 6
> different records.

> How can I combine all records into one so that company A is listed once in the
> database yet all the product they own are included in that record ?

> Any help greatly appreciate.

> If I am too confusing sorry, email me and I1ll try to explain it better

> MC


 
 
 

Combining multiple records of same types into one record

Post by MCol » Fri, 11 Oct 2002 23:57:08




> This is the way the database should be set up. There should be 1 record for
> each product. If you want to display all Products that belong to a Company.
> Then create a relationship from your file where the Company records are kept
> to the Products database.

> Use Company::Company fields (hopefully this is an ID) and then set up a
> portal in the file that contains the records for each Company. What you will
> get is a list of all Products that belong to that Company.

That's the way it's set up now, what I'm trying to do is combine all
products own by a particular company into one record. Any thoughts ?

MC

 
 
 

Combining multiple records of same types into one record

Post by Chris Brow » Sat, 12 Oct 2002 06:42:38


<<any thoughts? >>

Yes. Consider a more conventional and functional structure  as Michael suggested.
Don't see the existing structure as an inviolate entity.  In essence what is
really required is to see all products owned by a particular company from one
Company record (i.e. portal), not necessarily  " combine all products own by a
particular company into one record". It is not as difficult as you may think.
Sound structure always pays dividends.

Chris Brown
Dept. Neurosurgery
University of Adelaide




> > This is the way the database should be set up. There should be 1 record for
> > each product. If you want to display all Products that belong to a Company.
> > Then create a relationship from your file where the Company records are kept
> > to the Products database.

> > Use Company::Company fields (hopefully this is an ID) and then set up a
> > portal in the file that contains the records for each Company. What you will
> > get is a list of all Products that belong to that Company.
> That's the way it's set up now, what I'm trying to do is combine all
> products own by a particular company into one record. Any thoughts ?

> MC

 
 
 

1. combine many records into one and one record into many

I am new to SQL server and I would like to like is there any way I can
combine many records into one and one record into many.

Input/Output (many records):

id  DX
1   A
1   B
1   C
2   A
2   B

Output/Input (one record):

id  DX1  DX2  DX3
1   A    B    C
2   A    B

I am a SAS programmer. I can do it pretty easily in SAS but I don't
know how to do it in Query Analyser/DTS scripts or whatever. Any help
is welcome.

2. Help!

3. Combining multiple records into one coma-separated field

4. IL-Chicago-30721--Web Development-Perl-UNIX-Windows-PL/SQL-ORACLE-Web developer-Perl, PL/SQL, Unix or Windows

5. Combining multiple selected records into a single record

6. Autonumber in SQLServer

7. How to combine multiple records into one beyond a simple union query

8. help i need to conver string contain millisecond to a time format

9. Load one source record to multiple destination records

10. Cleaning up: multiple records to one record

11. Multiple records displayed as one record

12. Display one record from multiple records

13. Populating item of one record of a multiple record display block