List:General Discussion« Previous MessageNext Message »
From:Larry Martell Date:December 17 2012 1:18pm
Subject:blank line when column changes
View as plain text  
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,
             data_tool.name t,
             cdsem_event_message_idx.tool_id tid
      FROM data_tool, cdsem_event_message_idx
      WHERE data_tool.id = 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?
Thread
blank line when column changesLarry Martell17 Dec
  • RE: blank line when column changesRick James18 Dec
    • Re: blank line when column changesLarry Martell18 Dec