Micro Niche Builder
Closed Thread
Results 1 to 2 of 2

Thread: How to convert a table

  1. #1

    Default How to convert a table

    Hi, all,

    I have a problem to convert table content based on existing content:

    DROP TABLE IF EXISTS `list`;
    CREATE TABLE `list` (
    `FACILITY` varchar(30) NOT NULL,
    `PRODUCT` varchar(30) NOT NULL,
    `SEGMENT` varchar(30) NOT NULL,
    PRIMARY KEY (`FACILITY`,`PRODUCT`,`SEGMENT`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    Let's say I know,
    I have 2 FACILITY: AUSTIN, BOSTON;
    (by

    select distinct facility from list;

    )
    I have 2 PRODUCT: A, B;
    (by

    select distinct product from list;

    )
    I have 2 SEGMENT: BIG, SMALL;
    (by

    select distinct segment from list;

    )

    the Total combination could be 2*2*2=8

    Now the current table "list" contains below data (3 records):
    AUSTIN, A, BIG;
    AUSTIN, B, SMALL;
    BOSTON, A, SMALL;

    How can I tell the other 5 combination by MYSQL?
    Thanks & regards,
    Lokananth
    Live Chat Software By miOOt


  2. Micro Niche Builder

  3. #2

    Default

    i dont think there is such query.
    you can fetch it sepratly,use loop to get desire result

Closed Thread

Similar Threads

  1. Convert ur screens to touch screen
    By rohitanu in forum Internet Marketing Forum
    Replies: 6
    Last Post: 08-02-2009, 10:09 PM
  2. Convert image to a PDF
    By Kay in forum Graphics
    Replies: 9
    Last Post: 08-02-2009, 05:59 AM
  3. How to convert a table
    By gilbertsavier in forum Databases
    Replies: 0
    Last Post: 07-17-2009, 07:21 AM
  4. change table align
    By ruchi_patel in forum Databases
    Replies: 7
    Last Post: 06-20-2009, 03:59 PM
  5. Table less layout
    By techkid in forum Graphics
    Replies: 5
    Last Post: 02-08-2009, 08:14 AM

Tags for this Thread

Bookmarks

Posting Permissions

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