Showing posts with label aggregate. Show all posts
Showing posts with label aggregate. Show all posts

Thursday, March 22, 2012

Couldn't use and aggregate funtion on an another aggregate function

I have a column that has an expression with a runningvalue in it, a sum of "PO Count" for each month. I need to create another column that aggregates the SUM of "PO Count %". I can't to do a Runningvalue on the Runingvalue. I can't even do a Sum on the Runningvalue.

Below is a message:
The value expression for the textbox 'textbox4' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.

I am using stored procedure and whnever I try to add a calculated field, Visual studio itself is getting hanged and asked me to close.

I am using Ms-SQL server 2005 and Vs 2005 Team System Enterprise Architect editions.

Any help?

Thanks in indavnce

Visualcpp

Aggregates of aggregates are not supported

Tuesday, February 14, 2012

Corrupted indexed view

Windows Server 2003
SQL Server 2000 Enterprise
One of our indexed views is periodically getting corrupted. When it
occurs, one of the aggregate money fields returns an incorrect value.
Rebuilding the view corrects the problem.
This is a financial system and these incorrect money amounts are
causing major problems. But removing the indexed view causes certain
summation functions of the system to be unacceptably slow.
How do I fix?
You should probably contact PSS to get tot he root of the problem.
http://support.microsoft.com/default...d=fh;EN-US;sql SQL Support
http://www.mssqlserver.com/faq/general-pss.asp MS PSS
Andrew J. Kelly SQL MVP
<thegap2@.excite.com> wrote in message
news:1129901119.648845.24860@.o13g2000cwo.googlegro ups.com...
> Windows Server 2003
> SQL Server 2000 Enterprise
> One of our indexed views is periodically getting corrupted. When it
> occurs, one of the aggregate money fields returns an incorrect value.
> Rebuilding the view corrects the problem.
> This is a financial system and these incorrect money amounts are
> causing major problems. But removing the indexed view causes certain
> summation functions of the system to be unacceptably slow.
> How do I fix?
>

Corrupted indexed view

Windows Server 2003
SQL Server 2000 Enterprise
One of our indexed views is periodically getting corrupted. When it
occurs, one of the aggregate money fields returns an incorrect value.
Rebuilding the view corrects the problem.
This is a financial system and these incorrect money amounts are
causing major problems. But removing the indexed view causes certain
summation functions of the system to be unacceptably slow.
How do I fix?You should probably contact PSS to get tot he root of the problem.
http://support.microsoft.com/defaul...id=fh;EN-US;sql SQL Support
http://www.mssqlserver.com/faq/general-pss.asp MS PSS
Andrew J. Kelly SQL MVP
<thegap2@.excite.com> wrote in message
news:1129901119.648845.24860@.o13g2000cwo.googlegroups.com...
> Windows Server 2003
> SQL Server 2000 Enterprise
> One of our indexed views is periodically getting corrupted. When it
> occurs, one of the aggregate money fields returns an incorrect value.
> Rebuilding the view corrects the problem.
> This is a financial system and these incorrect money amounts are
> causing major problems. But removing the indexed view causes certain
> summation functions of the system to be unacceptably slow.
> How do I fix?
>

Corrupted indexed view

Windows Server 2003
SQL Server 2000 Enterprise
One of our indexed views is periodically getting corrupted. When it
occurs, one of the aggregate money fields returns an incorrect value.
Rebuilding the view corrects the problem.
This is a financial system and these incorrect money amounts are
causing major problems. But removing the indexed view causes certain
summation functions of the system to be unacceptably slow.
How do I fix?You should probably contact PSS to get tot he root of the problem.
http://support.microsoft.com/default.aspx?scid=fh;EN-US;sql SQL Support
http://www.mssqlserver.com/faq/general-pss.asp MS PSS
--
Andrew J. Kelly SQL MVP
<thegap2@.excite.com> wrote in message
news:1129901119.648845.24860@.o13g2000cwo.googlegroups.com...
> Windows Server 2003
> SQL Server 2000 Enterprise
> One of our indexed views is periodically getting corrupted. When it
> occurs, one of the aggregate money fields returns an incorrect value.
> Rebuilding the view corrects the problem.
> This is a financial system and these incorrect money amounts are
> causing major problems. But removing the indexed view causes certain
> summation functions of the system to be unacceptably slow.
> How do I fix?
>