I have a table that has a structure similar to this

| KeyField  | Attrib1 | Attrib2 | Attrib 3 |

What I need to do for a report that I need to generate is break this into
multiple rows, as

| KeyField  | Attrib1 |
| KeyField  | Attrib2 |
| KeyField  | Attrib3 |

Key field is not unique, and obviously I'd prefer if the result table was
actually

| KeyField  | Attrib |

so that I can suppress rows where Attrib contains no data.

I can think of several ways to do this, but they're all too convoluted for
the system we're using here.  Ideally, it should be in a single SELECT
statement.  I've tried subqueries and temporary tables but I've been unable
to make this work.

Any pointers that anyone can give me?

--
Dave Weingart, Sr. Programmer/Analyst    "I can call modules from the vasty
Private Label Services                    deep." -- "Why, so can I, or so
can
Voice: +1-516-682-1470                    any programmer.  But will they run
FAX  : +1-516-496-3160                    when you do call for them?"

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to