When you say "report" what exactly do you mean? In the client., have you 
looked at using \G and not ; to terminate your queries?

Why not transform your data structure and keep only one column of data, as 
you suggested?

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


[EMAIL PROTECTED] wrote on 09/10/2004 10:11:05 AM:

> 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