Red Gate forums :: View topic - Formating not correct when using OVER()
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt Previous Versions
SQL Prompt Previous Versions forum

Formating not correct when using OVER()

Search in SQL Prompt Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
Random Lengths



Joined: 29 Sep 2008
Posts: 25
Location: Eugene, OR

PostPosted: Tue Aug 17, 2010 6:02 pm    Post subject: Formating not correct when using OVER() Reply with quote

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.
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 690
Location: Cambridge

PostPosted: Thu Aug 19, 2010 10:21 am    Post subject: Reply with quote

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.
_________________
Anuradha Deshpande
Product Support
Redgate Software Ltd.
E-mail: support@red-gate.com
Back to top
View user's profile Send private message Send e-mail
Random Lengths



Joined: 29 Sep 2008
Posts: 25
Location: Eugene, OR

PostPosted: Thu Aug 19, 2010 4:26 pm    Post subject: Didn't work Reply with quote

I downloaded and installed 4.0.4.23.

No change in behavior.

The issue is not resolved.

Dan
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group