Is this possible?

Results 1 to 2 of 2

Thread: Is this possible?

  1. #1
    Join Date
    Dec 1969

    Default Is this possible?

    I have these fields in a table:<BR>1. company name<BR>2. address<BR>3. telephone<BR>4. fax no<BR>5. product category<BR><BR>From these field, can I generate this output.<BR><BR>Product category: Steel<BR> A<BR> B<BR> C<BR><BR>Product category: Valves<BR> D<BR> E<BR> F<BR><BR>Product category: Air-Cond<BR> X<BR> Y<BR> Z<BR><BR>What I normally get is just one at one time.<BR><BR>Product category: Air-Cond<BR> X<BR> Y<BR> Z<BR>

  2. #2
    Join Date
    Dec 1969

    Default yeah but better to

    create 3 tables assuming that a company can produce more than one category of products!<BR><BR>product<BR>Cat_id (number)<BR>Category (text)<BR><BR>company&category<BR>Cat_id<BR>Com_id <BR><BR><BR>company<BR>Com_id<BR>1. company_name<BR>2. address<BR>3. telephone<BR>4. fax no<BR><BR>then you can do joins<BR>Select * FROM company, company&category, product<BR>Where company.Com_id = company&category.Com_id <BR>AND company&caegaory.Cat_id = product.cat_id <BR>AND product.category = &#039;Air-Con&#039;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts