List:General Discussion« Previous MessageNext Message »
From:Rick James Date:December 18 2012 10:48pm
Subject:RE: blank line when column changes
View as plain text  
could get you something like that.

Otherwise, I would advise that you use your application language (PHP, Java, etc) to do "presentation" type stuff.

Yes, it could be done is SQL, but my brain might explode if I try to conjure up such.

> -----Original Message-----
> From: Larry Martell [mailto:larry.martell@stripped]
> Sent: Monday, December 17, 2012 5:18 AM
> To: mysql mailing list
> Subject: blank line when column changes
> I have this query:
> SELECT q1.t, data_eventlog.message, q1.dt, data_eventlog.date_time FROM
> (SELECT cdsem_event_message_idx.message m,
>              cdsem_event_message_idx.date_time dt,
>     t,
>              cdsem_event_message_idx.tool_id tid
>       FROM data_tool, cdsem_event_message_idx
>       WHERE = cdsem_event_message_idx.tool_id
>       AND cdsem_event_message_idx.message_idx = 'ExitingToOn') q1,
> data_eventlog WHERE data_eventlog.date_time <= q1.dt AND
> TIMESTAMPDIFF(SECOND, data_eventlog.date_time, q1.dt) < 120 AND
> data_eventlog.tool_id = q1.tid ORDER BY q1.t, q1.dt,
> data_eventlog.date_time
> What I want to do is output a blank line whenever (q1.t, q1.dt)
> changes. Is there any way to do that in SQL?
> --
> MySQL General Mailing List
> For list archives:
> To unsubscribe:

blank line when column changesLarry Martell17 Dec
  • RE: blank line when column changesRick James18 Dec
    • Re: blank line when column changesLarry Martell18 Dec