#122 Formatting request

open
nobody
None
5
2008-02-09
2008-02-09
johnnyh
No

Hi all,

I would like to have my statements formatted like the example below, but only when I give Quantum a command to do so.

The idea is that most of the lines can be easily commented out with '--'. And I aligned the dots in the where clause, but that is not really important...

SELECT
avg.tag
, avg.time
, CAST( pi.value AS float32) Value
, CAST(avg.value AS float32) RunningAverage
, CAST(std.value AS float32) StdDev
, sum(cast(cast(avg.value as float32) - cast(pi.value as float32) as float32)) sumdiff
from
table1 pi
, table2 avg
, table3 std
where
avg.tag = 'mytag'
and pi.tag = avg.tag
and std.tag = pi.tag
and avg.timestep = '10m'
and pi.timestep = '10m'
and std.timestep = '10m'
and avg.calcbasis='FourierTransform'
--and std.calcbasis='FourierTransform' -- Timeout?
GROUP BY
avg.tag
, avg.time
, CAST( pi.value AS float32)
, CAST(avg.value AS float32)
, CAST(std.value AS float32)

Kind regards,

Jan

Discussion


Log in to post a comment.