How can we help you today? How can we help you today?

Formating not correct when using OVER()

I just ran a cntrl K + Y and this is what I got

SELECT tst.TransId
,tst.TransType
,tst.Invoice
,tst.OrgId
,tst.IndId
,tst.PUB
,tst.Media
,tst.TransDate
,tst.Amount
,tst.GST
,tst.Reconciled
,tst.Void
,SUM(tst.Amount) OVER () AS MTotal
,SUM(tst.GST) OVER () AS GSTTotal
FROM [subscriptions].[dbo].[tblSubsTrans]
AS tst
WHERE MONTH(tst.TransDate) = 7
AND YEAR(tst.TransDate) = 2010
AND tst.GST > 0
AND tst.Void = 0
ORDER BY tst.Invoice
,tst.IndId
,tst.PUB


I expected:

SELECT tst.TransId
,tst.TransType
,tst.Invoice
,tst.OrgId
,tst.IndId
,tst.PUB
,tst.Media
,tst.TransDate
,tst.Amount
,tst.GST
,tst.Reconciled
,tst.Void
,SUM(tst.Amount) OVER () AS MTotal
,SUM(tst.GST) OVER () AS GSTTotal
FROM [subscriptions].[dbo].[tblSubsTrans]
AS tst
WHERE MONTH(tst.TransDate) = 7
AND YEAR(tst.TransDate) = 2010
AND tst.GST > 0
AND tst.Void = 0
ORDER BY tst.Invoice
,tst.IndId
,tst.PUB

If I remove the two SUM fields, I get the expected indentation. I hope indenting shows up in this post.
Random Lengths
0

Comments

2 comments

  • Anu D
    Many thanks for your post.

    As per your post and your email I think you are using SQL Prompt 4.0.4.11

    Can you kindly install the latest patch version of SQL Prompt from here?

    Kindly let me know if this fixes the issue.
    Anu D
    0
  • Random Lengths
    I downloaded and installed 4.0.4.23.

    No change in behavior.

    The issue is not resolved.

    Dan
    Random Lengths
    0

Add comment

Please sign in to leave a comment.