Showing posts with label cumulative. Show all posts
Showing posts with label cumulative. Show all posts

Sunday, March 11, 2012

Cumulative weeks

SQL Server 2000 SP3

Hi,

How can I get the cumulative weeks from a givedate to the current
date. I know I can get the weeknumber by using datepart(wk,getdate())
but this will give
me the week number for this year. What if I want to know the number of
weeks
that have passed since june 1 2001. If I use datepart(wk,'20010106') I
will
get the week number for 2001 but I would like the number of weeks
expired between then now.

Thanks,
RegOn 2 Sep 2004 10:01:12 -0700, Sam wrote:

>SQL Server 2000 SP3
>Hi,
>How can I get the cumulative weeks from a givedate to the current
>date. I know I can get the weeknumber by using datepart(wk,getdate())
>but this will give
>me the week number for this year. What if I want to know the number of
>weeks
>that have passed since june 1 2001. If I use datepart(wk,'20010106') I
>will
>get the week number for 2001 but I would like the number of weeks
>expired between then now.
>Thanks,
> Reg

Hi Reg,

select datediff(week, '20010106', getdate())

----
191

By the way - '20010106' is january 6, not june 1...

Best, Hugo
--

(Remove _NO_ and _SPAM_ to get my e-mail address)

Cumulative wait time on server replies ??

Hello all,

I've got a query which suddently became very slow. It now takes about 10
secs instead of 2 secs.

I've got to identical DB (one is for test and the other is production). The
query is slow only in production.

When running this query in both DB and looking at execution plan,
statistics, etc, the onle difference is the Cumulative wait time on server
replies.

In test DB, I get the value: 2200
And in production DB: 1.22344e+009

What does this mean concretly? What do I have to do to solve this problem?

TIA.

Yannick

PS I'm using SS2000 SP3 on NT4.0Yannick Turgeon (nobody@.nowhere.com) writes:
> I've got a query which suddently became very slow. It now takes about 10
> secs instead of 2 secs.
> I've got to identical DB (one is for test and the other is production).
> The query is slow only in production.
> When running this query in both DB and looking at execution plan,
> statistics, etc, the onle difference is the Cumulative wait time on server
> replies.
> In test DB, I get the value: 2200
> And in production DB: 1.22344e+009
> What does this mean concretly? What do I have to do to solve this problem?

Books Online says:

Cumulative amount of time the driver spent waiting for replies from the
server.

I would suppose that if you have had that query window open for a long
time, this number becomes quite high. I doubt that it has anything to
do with the slowness of your query.

Why your query is suddently slow, I have no idea, but if you have identical
plans on two servers with identical data (I assume!), then maybe you should
check so that there is no other activity on the production machine.

DBCC SHOWCONTIG on the involved tables may show some difference in
fragmentation.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||> > In test DB, I get the value: 2200
> > And in production DB: 1.22344e+009
> > What does this mean concretly? What do I have to do to solve this
problem?
> I would suppose that if you have had that query window open for a long
> time, this number becomes quite high. I doubt that it has anything to
> do with the slowness of your query.
It corresponds quite acuratly with the time I'm waiting though. But maybe it
is simply the consequences of something else.

> Why your query is suddently slow, I have no idea, but if you have
identical
> plans
Yes they are.

> on two servers with identical data (I assume!),
On the same server with data slightly different: Test env. being 1 or 2 days
older.

> then maybe you should
> check so that there is no other activity on the production machine.
> DBCC SHOWCONTIG on the involved tables may show some difference in
> fragmentation.

Test
----
DBCC SHOWCONTIG scanning 'ReservationTravaux' table...
Table: 'ReservationTravaux' (1920725895); index ID: 1, database ID: 8
TABLE level scan performed.
- Pages Scanned........................: 158
- Extents Scanned.......................: 21
- Extent Switches.......................: 20
- Avg. Pages per Extent..................: 7.5
- Scan Density [Best Count:Actual Count]......: 95.24% [20:21]
- Logical Scan Fragmentation ..............: 0.63%
- Extent Scan Fragmentation ...............: 38.10%
- Avg. Bytes Free per Page................: 808.3
- Avg. Page Density (full)................: 90.01%

Production
----
DBCC SHOWCONTIG scanning 'ReservationTravaux' table...
Table: 'ReservationTravaux' (1920725895); index ID: 1, database ID: 7
TABLE level scan performed.
- Pages Scanned........................: 165
- Extents Scanned.......................: 21
- Extent Switches.......................: 20
- Avg. Pages per Extent..................: 7.9
- Scan Density [Best Count:Actual Count]......: 100.00% [21:21]
- Logical Scan Fragmentation ..............: 7.88%
- Extent Scan Fragmentation ...............: 19.05%
- Avg. Bytes Free per Page................: 786.1
- Avg. Page Density (full)................: 90.29%

What do you think about that? Looks like there are a lot of differences
between only those two values:
- Logical Scan Fragmentation
- Extent Scan Fragmentation

Yannick|||Yannick Turgeon (nobody@.nowhere.com) writes:
> Test
> ----
> DBCC SHOWCONTIG scanning 'ReservationTravaux' table...
> Table: 'ReservationTravaux' (1920725895); index ID: 1, database ID: 8
> TABLE level scan performed.
> - Pages Scanned........................: 158
> - Extents Scanned.......................: 21
> - Extent Switches.......................: 20
> - Avg. Pages per Extent..................: 7.5
> - Scan Density [Best Count:Actual Count]......: 95.24% [20:21]
> - Logical Scan Fragmentation ..............: 0.63%
> - Extent Scan Fragmentation ...............: 38.10%
> - Avg. Bytes Free per Page................: 808.3
> - Avg. Page Density (full)................: 90.01%
> Production
> ----
> DBCC SHOWCONTIG scanning 'ReservationTravaux' table...
> Table: 'ReservationTravaux' (1920725895); index ID: 1, database ID: 7
> TABLE level scan performed.
> - Pages Scanned........................: 165
> - Extents Scanned.......................: 21
> - Extent Switches.......................: 20
> - Avg. Pages per Extent..................: 7.9
> - Scan Density [Best Count:Actual Count]......: 100.00% [21:21]
> - Logical Scan Fragmentation ..............: 7.88%
> - Extent Scan Fragmentation ...............: 19.05%
> - Avg. Bytes Free per Page................: 786.1
> - Avg. Page Density (full)................: 90.29%
>
> What do you think about that? Looks like there are a lot of differences
> between only those two values:
> - Logical Scan Fragmentation
> - Extent Scan Fragmentation

Books Online says that these two should be as low as possible,
preferably close to 0, but below 10 is OK. From this the 38% percent
of Extent Scan Fragmentation on Test is the most scary-looking.

In any case, this is not the answer to why your query runs so much
slower in production. However, if there are additional indexes for the
table, you should run SHOWCONTIG for these as well. The above is only
for the clustered index.

The only other possibility I can think of is that you have a blocking
issue in production. Rather than going for a cup of coffee next you're
waiting for the query, run an sp_who and see if the Blk column has
anything to offer.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland,

Thanks for your support. Yesterday I've restarted my server and the problem
is now solved. I'll look to defragment my indexes on this table and probably
some other too.

Yannick

Cumulative wait time on server replies

i've got 2 identiical db on 2 servers. the hardware config is different. i
run the same queries on these 2 servers. execution plan, statistics like
reads / writes / cpu time, etc are all the same, the only difference is the
"Cumulative wait time on server replies".
What does it mean? does it have anything to do with the hardware like
memory, paging file or even the speed of the hard disks?
thanks.SQL Books Online says :-
Cumulative amount of time the driver spent waiting for replies from the
server.
It's unlikely this has anything to do with the performance of your query.
You have identical query plans on different servers, do you have the same
volume of data..?
What does DBCC SHOWCONTIG show for the tables, are there differences in the
level of fragmentation.
Is blocking an issue on one of the servers as it's in a Production
environment and the other is Test..
HTH. Ryan
"Kitty" <Kitty@.discussions.microsoft.com> wrote in message
news:E865E508-11BD-4F5D-9568-1C1BAABB4F27@.microsoft.com...
> i've got 2 identiical db on 2 servers. the hardware config is different.
> i
> run the same queries on these 2 servers. execution plan, statistics like
> reads / writes / cpu time, etc are all the same, the only difference is
> the
> "Cumulative wait time on server replies".
> What does it mean? does it have anything to do with the hardware like
> memory, paging file or even the speed of the hard disks?
> thanks.
>

Cumulative wait time on server replies

i've got 2 identiical db on 2 servers. the hardware config is different. i
run the same queries on these 2 servers. execution plan, statistics like
reads / writes / cpu time, etc are all the same, the only difference is the
"Cumulative wait time on server replies".
What does it mean? does it have anything to do with the hardware like
memory, paging file or even the speed of the hard disks?
thanks.SQL Books Online says :-
Cumulative amount of time the driver spent waiting for replies from the
server.
It's unlikely this has anything to do with the performance of your query.
You have identical query plans on different servers, do you have the same
volume of data..?
What does DBCC SHOWCONTIG show for the tables, are there differences in the
level of fragmentation.
Is blocking an issue on one of the servers as it's in a Production
environment and the other is Test..
HTH. Ryan
"Kitty" <Kitty@.discussions.microsoft.com> wrote in message
news:E865E508-11BD-4F5D-9568-1C1BAABB4F27@.microsoft.com...
> i've got 2 identiical db on 2 servers. the hardware config is different.
> i
> run the same queries on these 2 servers. execution plan, statistics like
> reads / writes / cpu time, etc are all the same, the only difference is
> the
> "Cumulative wait time on server replies".
> What does it mean? does it have anything to do with the hardware like
> memory, paging file or even the speed of the hard disks?
> thanks.
>

Cumulative update packages for Post-SP2 changes in SQL2005

Hi !
I see there are quite a few cumulated post-SP2 packages that have been
built, some of which fix errors that I have been experiencing in my
environment.
I have doubts if that's good practice to apply those cumulative packages to
my life production servers... is it ?
Any idea on how long we have to wait until SP3 will be built ?
Palli
Hi
I can't say if/when SP3 is due, but most of the post SP2 hotfixes require
you to contact PSS for them. In general hotfixes are cumulative so you only
need to apply the last one.
John
"Pall Bjornsson" <palli@.kvos.is> wrote in message
news:etaKos7cIHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hi !
> I see there are quite a few cumulated post-SP2 packages that have been
> built, some of which fix errors that I have been experiencing in my
> environment.
> I have doubts if that's good practice to apply those cumulative packages
> to my life production servers... is it ?
> Any idea on how long we have to wait until SP3 will be built ?
> Palli
>
|||>
> I can't say if/when SP3 is due, but most of the post SP2 hotfixes require
> you to contact PSS for them. In general hotfixes are cumulative so you
> only need to apply the last one.
>
I did contact MS about the cumulative packages, and I did receive one from
them for 1 or 2 weeks ago, I think it's number 5.
1) I haven't had the guts yet to apply them, so the question is, should I
apply them to my production servers ?
2) Will I have to uninstall them before applying SP3 ?
Palli
|||Hi
You should apply any service pack or hotfixes to a test machine and make
sure they work as expected and don't break anything else, once satisfied you
can then apply them to a production system, but make sure that you have a
rollback process and recovery procedures in place to copy with any
eventuality.
You should be able to apply any new hotfix/service pack ontop of the one you
have providing the version number is higher.
John
"Pall Bjornsson" <palli@.kvos.is> wrote in message
news:eQEm4A8cIHA.2268@.TK2MSFTNGP02.phx.gbl...
> I did contact MS about the cumulative packages, and I did receive one from
> them for 1 or 2 weeks ago, I think it's number 5.
> 1) I haven't had the guts yet to apply them, so the question is, should I
> apply them to my production servers ?
> 2) Will I have to uninstall them before applying SP3 ?
> Palli
>
|||Palli,
If you are registered on Connect then vote here:-
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=326575
We are running CU2 on one production system and are looking at upgrading to
either CU5 or CU6 but only after fully testing on Development and Acceptance
servers first. On one server we get mini dumps associated with a fix
included in CU4.
Chris
"Pall Bjornsson" <palli@.kvos.is> wrote in message
news:eQEm4A8cIHA.2268@.TK2MSFTNGP02.phx.gbl...
> I did contact MS about the cumulative packages, and I did receive one from
> them for 1 or 2 weeks ago, I think it's number 5.
> 1) I haven't had the guts yet to apply them, so the question is, should I
> apply them to my production servers ?
> 2) Will I have to uninstall them before applying SP3 ?
> Palli
>

Cumulative update packages for Post-SP2 changes in SQL2005

Hi !
I see there are quite a few cumulated post-SP2 packages that have been
built, some of which fix errors that I have been experiencing in my
environment.
I have doubts if that's good practice to apply those cumulative packages to
my life production servers... is it ?
Any idea on how long we have to wait until SP3 will be built ?
PalliHi
I can't say if/when SP3 is due, but most of the post SP2 hotfixes require
you to contact PSS for them. In general hotfixes are cumulative so you only
need to apply the last one.
John
"Pall Bjornsson" <palli@.kvos.is> wrote in message
news:etaKos7cIHA.4936@.TK2MSFTNGP03.phx.gbl...
> Hi !
> I see there are quite a few cumulated post-SP2 packages that have been
> built, some of which fix errors that I have been experiencing in my
> environment.
> I have doubts if that's good practice to apply those cumulative packages
> to my life production servers... is it ?
> Any idea on how long we have to wait until SP3 will be built ?
> Palli
>|||>
> I can't say if/when SP3 is due, but most of the post SP2 hotfixes require
> you to contact PSS for them. In general hotfixes are cumulative so you
> only need to apply the last one.
>
I did contact MS about the cumulative packages, and I did receive one from
them for 1 or 2 weeks ago, I think it's number 5.
1) I haven't had the guts yet to apply them, so the question is, should I
apply them to my production servers ?
2) Will I have to uninstall them before applying SP3 ?
Palli|||Hi
You should apply any service pack or hotfixes to a test machine and make
sure they work as expected and don't break anything else, once satisfied you
can then apply them to a production system, but make sure that you have a
rollback process and recovery procedures in place to copy with any
eventuality.
You should be able to apply any new hotfix/service pack ontop of the one you
have providing the version number is higher.
John
"Pall Bjornsson" <palli@.kvos.is> wrote in message
news:eQEm4A8cIHA.2268@.TK2MSFTNGP02.phx.gbl...
> >
>> I can't say if/when SP3 is due, but most of the post SP2 hotfixes require
>> you to contact PSS for them. In general hotfixes are cumulative so you
>> only need to apply the last one.
> I did contact MS about the cumulative packages, and I did receive one from
> them for 1 or 2 weeks ago, I think it's number 5.
> 1) I haven't had the guts yet to apply them, so the question is, should I
> apply them to my production servers ?
> 2) Will I have to uninstall them before applying SP3 ?
> Palli
>|||Palli,
If you are registered on Connect then vote here:-
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=326575
We are running CU2 on one production system and are looking at upgrading to
either CU5 or CU6 but only after fully testing on Development and Acceptance
servers first. On one server we get mini dumps associated with a fix
included in CU4.
Chris
"Pall Bjornsson" <palli@.kvos.is> wrote in message
news:eQEm4A8cIHA.2268@.TK2MSFTNGP02.phx.gbl...
> >
>> I can't say if/when SP3 is due, but most of the post SP2 hotfixes require
>> you to contact PSS for them. In general hotfixes are cumulative so you
>> only need to apply the last one.
> I did contact MS about the cumulative packages, and I did receive one from
> them for 1 or 2 weeks ago, I think it's number 5.
> 1) I haven't had the guts yet to apply them, so the question is, should I
> apply them to my production servers ?
> 2) Will I have to uninstall them before applying SP3 ?
> Palli
>|||On Wed, 20 Feb 2008 12:21:42 -0000, Pall Bjornsson wrote:
>Hi !
>I see there are quite a few cumulated post-SP2 packages that have been
>built, some of which fix errors that I have been experiencing in my
>environment.
>I have doubts if that's good practice to apply those cumulative packages to
>my life production servers... is it ?
>Any idea on how long we have to wait until SP3 will be built ?
Hi Palli,
Read
http://sqlblog.com/blogs/hugo_kornelis/archive/2008/02/01/want-a-service-pack-ask-for-it.aspx
Then make yourself heard at
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=326575
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis

Cumulative update package2 for SQL2005 SP2 - cluster aware?

Hi,
Is the "Cumulative update package2 for SQL2005 SP2"
(http://support.microsoft.com/kb/936305) cluster aware? Or do it need to be
installed on each cluster node?
Thanks!
SQL_help
Hi
You need to install service pack on SQL Instance (NODE1) and binaries get
copied to the second(passive) node.
If you have ACTIVE/ACTIVE configuration then you need to install an both
sql instances
"SQL_help" <aaa@.bbb.com> wrote in message
news:eNn5ZPr1HHA.1336@.TK2MSFTNGP04.phx.gbl...
> Hi,
> Is the "Cumulative update package2 for SQL2005 SP2"
> (http://support.microsoft.com/kb/936305) cluster aware? Or do it need to
> be installed on each cluster node?
> Thanks!
> SQL_help
>

Cumulative update

I am getting ready to install a new cluster and was wondering what the best
cumulative update would be. I am installing it on a HP 460c blade server and
using the x64 version of SQL2005 Enterprise.
Any help is appreciated.
Start with SP2. Then depending on what problems you are running into apply
the latest hot fixes. They are all cumulative.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Dave B" <DaveB@.discussions.microsoft.com> wrote in message
news:655E5E3C-8ED2-44D3-838F-87D2DC1BFCDF@.microsoft.com...
>I am getting ready to install a new cluster and was wondering what the best
> cumulative update would be. I am installing it on a HP 460c blade server
> and
> using the x64 version of SQL2005 Enterprise.
> Any help is appreciated.
>
|||I have been running build 3161 (Post SP2 hotfix) with no problems so far.
Geoff N. Hiten
Senior SQL Infrastructure Consultant
Microsoft SQL Server MVP
"Dave B" <DaveB@.discussions.microsoft.com> wrote in message
news:655E5E3C-8ED2-44D3-838F-87D2DC1BFCDF@.microsoft.com...
>I am getting ready to install a new cluster and was wondering what the best
> cumulative update would be. I am installing it on a HP 460c blade server
> and
> using the x64 version of SQL2005 Enterprise.
> Any help is appreciated.
>

cumulative totals in chart : Report Builder

Hi,

I am trying to display a line chart with cumulative totals over period of 12 months in a fiscal year. I know this can be achieveable in report designer using "Running value function".

Any idea how to achieve the same in Report builder ?

thanks in advance.

Here is the data :

Month Count

July 2

Aug 3

Sept 2

Expected output should be

Month Count

July 2

Aug 5(July count + Aug.Count)

Sept 7(July count + Aug count + Sept Count)

Regards,

bala

Hi guys,

Any idea how to achieve the above functionality in Report Builder ?

Cumulative total in matrix

Hi,
For columns in a matrix, I need to add the row value to the row value in
previous column. Is there a way to do this?
Here is what I want the matrix results to look like:
year1 year2 year3 year4
Amount 1 3 4 7
Total 1 4 8 15
Year is the column group value and amount is the row group value. Total is
the field I am looking for how to calculate.
Thanks!Initially I thought you were after a running total, but looking at your
example that doesn't appear to be the case.
You will have to do this in the underlying query by including the two
consecutive year's values on the same row; i.e.
Select A.Year, Sum(A.Value), (Select Sum(B.Value) From MyTable B Where
B.Year = A.Year-1)
From MyTable A
Group By A.Year
(I'm not sure this is syntactically correct, but you get my drift)
Having said that, mathematically what you're showing would appear
incorrect, effectively the year2 total is included in the year4 total
twice. What are you trying to show?
Chris
Me wrote:
> Hi,
> For columns in a matrix, I need to add the row value to the row value
> in previous column. Is there a way to do this?
> Here is what I want the matrix results to look like:
> year1 year2 year3 year4
> Amount 1 3 4 7
> Total 1 4 8 15
> Year is the column group value and amount is the row group value.
> Total is the field I am looking for how to calculate.
> Thanks!|||Hi Chris,
Thanks for replying.
What I wrote is a little unclear but my example is correct. They want to
add the current year to the running total of the previous years. Does that
make sense?
Thanks,
Melissa
"Chris McGuigan" wrote:
> Initially I thought you were after a running total, but looking at your
> example that doesn't appear to be the case.
> You will have to do this in the underlying query by including the two
> consecutive year's values on the same row; i.e.
> Select A.Year, Sum(A.Value), (Select Sum(B.Value) From MyTable B Where
> B.Year = A.Year-1)
> From MyTable A
> Group By A.Year
> (I'm not sure this is syntactically correct, but you get my drift)
> Having said that, mathematically what you're showing would appear
> incorrect, effectively the year2 total is included in the year4 total
> twice. What are you trying to show?
> Chris
>
> Me wrote:
> > Hi,
> >
> > For columns in a matrix, I need to add the row value to the row value
> > in previous column. Is there a way to do this?
> >
> > Here is what I want the matrix results to look like:
> >
> > year1 year2 year3 year4
> > Amount 1 3 4 7
> > Total 1 4 8 15
> >
> > Year is the column group value and amount is the row group value.
> > Total is the field I am looking for how to calculate.
> >
> > Thanks!
>|||Melissa, Yes that makes sense (logically not statistically), but I
think you may have mis-interpreted it.
In the example you have given, year 3 is neither a running total nor a
grand total. It is year1 + year2 + year1 + year3, that's the effect of
what you are doing.
So they want the current year added to each past year? I still can't
see a reason for that, but hey! the customers always right!
You are better off doing this in the query. Matrix controls like fairly
simply structured data, so hide the complexity in the query, on the
lines of my original post.
The more I look at this, the more I think you probably just need a
running total. If that is the case use =RunningValue( ... ) in the cell.
Chris
Me wrote:
> Hi Chris,
> Thanks for replying.
> What I wrote is a little unclear but my example is correct. They
> want to add the current year to the running total of the previous
> years. Does that make sense?
> Thanks,
> Melissa
>
> "Chris McGuigan" wrote:
> > Initially I thought you were after a running total, but looking at
> > your example that doesn't appear to be the case.
> >
> > You will have to do this in the underlying query by including the
> > two consecutive year's values on the same row; i.e.
> > Select A.Year, Sum(A.Value), (Select Sum(B.Value) From MyTable B
> > Where B.Year = A.Year-1)
> > From MyTable A
> > Group By A.Year
> > (I'm not sure this is syntactically correct, but you get my drift)
> >
> > Having said that, mathematically what you're showing would appear
> > incorrect, effectively the year2 total is included in the year4
> > total twice. What are you trying to show?
> >
> > Chris
> >
> >
> >
> > Me wrote:
> >
> > > Hi,
> > >
> > > For columns in a matrix, I need to add the row value to the row
> > > value in previous column. Is there a way to do this?
> > >
> > > Here is what I want the matrix results to look like:
> > >
> > > year1 year2 year3 year4
> > > Amount 1 3 4 7
> > > Total 1 4 8 15
> > >
> > > Year is the column group value and amount is the row group value.
> > > Total is the field I am looking for how to calculate.
> > >
> > > Thanks!
> >
> >

Cumulative Total

I try to sum a value in the TABLE FOOTER if this record falls into a
particular condition. But the result is zero.
The formular is as follow:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
Fields!CN_WGT.Value, 0))
If I the formular like this:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP", 1, 0))
It works !!!
What's wrong ?What's the datatype of Fields!CN_WGT.Value? I would assume it is not a
System.Int32, but 0 is a System.Int32.
You might want to try 0.0 instead of 0:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
Fields!CN_WGT.Value, 0.0))
Alternatively:
=Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
CDbl(Fields!CN_WGT.Value), 0.0))
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
news:26102E03-4F38-4F38-872E-633F5E02B78B@.microsoft.com...
> I try to sum a value in the TABLE FOOTER if this record falls into a
> particular condition. But the result is zero.
> The formular is as follow:
> =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
> Fields!CN_WGT.Value, 0))
> If I the formular like this:
> =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP", 1,
0))
> It works !!!
> What's wrong ?|||Thanks, it works now !!!
"Robert Bruckner [MSFT]" wrote:
> What's the datatype of Fields!CN_WGT.Value? I would assume it is not a
> System.Int32, but 0 is a System.Int32.
> You might want to try 0.0 instead of 0:
> =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
> Fields!CN_WGT.Value, 0.0))
> Alternatively:
> =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
> CDbl(Fields!CN_WGT.Value), 0.0))
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "May Liu" <MayLiu@.discussions.microsoft.com> wrote in message
> news:26102E03-4F38-4F38-872E-633F5E02B78B@.microsoft.com...
> > I try to sum a value in the TABLE FOOTER if this record falls into a
> > particular condition. But the result is zero.
> > The formular is as follow:
> > =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP",
> > Fields!CN_WGT.Value, 0))
> >
> > If I the formular like this:
> > =Sum(IIf(Fields!EQP_LEN.Value = 20 And Fields!EQP_TYPE.Value = "GP", 1,
> 0))
> > It works !!!
> >
> > What's wrong ?
>
>

Thursday, March 8, 2012

cumulative Percentage with set

hi,
I'm newbie in MDX,
could anyone please help on the following questions

I've following MDX

WITH
SET [topZ%]
AS 'TOPPERCENT(NONEMPTYCROSSJOIN({[product].[productcode].CHILDREN},{[Timeofday].[Dt].&[2006-09-01T00:00:00]}),70,([Measures].[sales]))'
//% contribution to the total
MEMBER [Measures].[%ofTot] AS '[Measures].[sales]/([Measures].[sales],[product].[productcode].[All])',FORMAT_STRING="PERCENT"
//Cumulative %
MEMBER [Measures].[Cum%] AS 'SUM({[topZ%].FIRSTSIBLING:[topZ%].CURRENTMEMBER},[Measures].[%ofTot])'
SELECT
{[Measures].[sales],[Measures].[%ofTot],[Measures].[Cum%] } on 0,
{[topZ%]} on 1
from testcube

I want the result as follows:

sales %ofTot Cum%
productA 2006-09-01 300 50% 50%
productB 2006-09-01 200 33% 83%
productC 2006-09-01 100 17% 100%

But there's problem on the [Cum%] column, its show #Error
Could someone please give some advice ? thanks a lot

Not sure how general a solution you need, but you can try something like:

MEMBER [Measures].[Cum%] AS

'SUM(Head([topZ%],

Rank(([product].[productcode].CurrentMember, [Timeofday].[Dt].CurrentMember),

[topZ%])), [Measures].[sales])

/([Measures].[sales],[product].[productcode].[All])',

FORMAT_STRING="PERCENT"

|||I see.
thanks deepak

Cumulative package 7.. Latest update ?

http://support.microsoft.com/kb/949095/LN/
Is this the latest build out there for SQL 2005 SP2 ?
ThanksThere may be a hotfix or two that came out since this release but yes this
is the latest cumulative update for SP2.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"RF" <rf@.test.com> wrote in message
news:e1$KVv2oIHA.2064@.TK2MSFTNGP05.phx.gbl...
> http://support.microsoft.com/kb/949095/LN/
> Is this the latest build out there for SQL 2005 SP2 ?
> Thanks
>|||"RF" wrote:
> http://support.microsoft.com/kb/949095/LN/
> Is this the latest build out there for SQL 2005 SP2 ?
> Thanks
Hi
According to http://support.microsoft.com/kb/937137/ CU7 was the last
release and neither page has been updated in the last week!
John

Cumulative max-length for index on SQL servers... please help

Folks,
What is the cumulative max-length of columns in both a clustered
and/or nonclustered index for:
a. SQL Server 2000
b. SQL Server 2005
Any comments much, much appreciated...
Thank you,
Al.Look for "maximum capacity specifications" in Books Online, this info
and more can be found there.
almurph@.altavista.com wrote:
> Folks,
> What is the cumulative max-length of columns in both a clustered
> and/or nonclustered index for:
> a. SQL Server 2000
> b. SQL Server 2005
>
> Any comments much, much appreciated...
> Thank you,
> Al.|||Tracy McKibben wrote:
> Look for "maximum capacity specifications" in Books Online, this info
> and more can be found there.
>
> almurph@.altavista.com wrote:
> > Folks,
> >
> > What is the cumulative max-length of columns in both a clustered
> > and/or nonclustered index for:
> >
> > a. SQL Server 2000
> > b. SQL Server 2005
> >
> >
> > Any comments much, much appreciated...
> >
> > Thank you,
> > Al.
Number of columns should not be more than 16 and cumulative length
should not be more than 900. But you can use included column opation in
SQL Server 2005 to add more columns.
More help you can find in Create index statement in BOL and Maximum
Capacity Specifications for SQL Server 2005
Regards
Amish Shah

Cumulative max-length for index on SQL servers... please help

Look for "maximum capacity specifications" in Books Online, this info
and more can be found there.
almurph@.altavista.com wrote:
> Folks,
> What is the cumulative max-length of columns in both a clustered
> and/or nonclustered index for:
> a. SQL Server 2000
> b. SQL Server 2005
>
> Any comments much, much appreciated...
> Thank you,
> Al.Folks,
What is the cumulative max-length of columns in both a clustered
and/or nonclustered index for:
a. SQL Server 2000
b. SQL Server 2005
Any comments much, much appreciated...
Thank you,
Al.|||Look for "maximum capacity specifications" in Books Online, this info
and more can be found there.
almurph@.altavista.com wrote:
> Folks,
> What is the cumulative max-length of columns in both a clustered
> and/or nonclustered index for:
> a. SQL Server 2000
> b. SQL Server 2005
>
> Any comments much, much appreciated...
> Thank you,
> Al.|||Tracy McKibben wrote:
[vbcol=seagreen]
> Look for "maximum capacity specifications" in Books Online, this info
> and more can be found there.
>
> almurph@.altavista.com wrote:
Number of columns should not be more than 16 and cumulative length
should not be more than 900. But you can use included column opation in
SQL Server 2005 to add more columns.
More help you can find in Create index statement in BOL and Maximum
Capacity Specifications for SQL Server 2005
Regards
Amish Shah|||Tracy McKibben wrote:
[vbcol=seagreen]
> Look for "maximum capacity specifications" in Books Online, this info
> and more can be found there.
>
> almurph@.altavista.com wrote:
Number of columns should not be more than 16 and cumulative length
should not be more than 900. But you can use included column opation in
SQL Server 2005 to add more columns.
More help you can find in Create index statement in BOL and Maximum
Capacity Specifications for SQL Server 2005
Regards
Amish Shah

Cumulative log

Is it possible to create a cumulative log using SSIS? basiclly I have 5 logs which hold failed records. I would like to create a cumulative log and send it via email using SSIS.

thoughts?

thanks

What do you mean "cumulative"? If you use a table to store your error records, you can pull in that table and send the records in an e-mail.

Though, if the records are going to be high, you may want to pull the records out to a text file and then attach that file in the Send Mail task. A better approach would be to house everything in a table and write a report against it.|||

how do you pull in different tables? via sql task? and what if you have more 1 table? you would only want to send one email with all the bad records from different tables.

|||Just create one error table. Log all of the bad records to that table and then later select from that table.|||

well all tables have different structures so a single table would not work. any other ideas?

|||If you want to combine them, you are going to have to make the structures similar at some point, right? You could use a dataflow with multiple sources to combine the tables into a flat file, then email that as an attachment.|||

I don't see an straight forward way to get all those rows into a single file/email. Perhaps, it may be easier to include just the key column(s); in such way the structure is the same for all the tables.

Cumulative hotfix package (build 2153)

I was wondering where I'd find specific information on the individual fixes,
specifically bug 447: Processing performance on multiprocessor computers is
somewhat slower than expected.
I've searched for info on each of the fixes listed, but so far have not
found any details.
Thanks very much,
TomTHello,
Unfortunately Microsoft Knowledge Base articles that discuss those fixes
havent been released yet. If we have any update on this, we will let you
know. As I know this bug is regarding some issues of read locks between
processors that may bring overhead.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Peter - I'll keep an eye out for any new kb's on these fixes.
""privatenews"" wrote:

> Hello,
> Unfortunately Microsoft Knowledge Base articles that discuss those fixes
> haven’t been released yet. If we have any update on this, we will let yo
u
> know. As I know this bug is regarding some issues of read locks between
> processors that may bring overhead.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
>
> This posting is provided "AS IS" with no warranties, and confers no rights
.
>
>

Cumulative hotfix package (build 2153)

I was wondering where I'd find specific information on the individual fixes,
specifically bug 447: Processing performance on multiprocessor computers is
somewhat slower than expected.
I've searched for info on each of the fixes listed, but so far have not
found any details.
Thanks very much,
TomTHello,
Unfortunately Microsoft Knowledge Base articles that discuss those fixes
haven?t been released yet. If we have any update on this, we will let you
know. As I know this bug is regarding some issues of read locks between
processors that may bring overhead.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Peter - I'll keep an eye out for any new kb's on these fixes.
""privatenews"" wrote:
> Hello,
> Unfortunately Microsoft Knowledge Base articles that discuss those fixes
> havenâ't been released yet. If we have any update on this, we will let you
> know. As I know this bug is regarding some issues of read locks between
> processors that may bring overhead.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> =====================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>

Cumulative Hotfix Package - Build 2153

I'm getting ready to install the Cumulative Hotfix Package - Build 2153 on a 2-node, Active/Passive cluster (MSSQL 2005 EE on Windows 2003). I've read through the docs a number of times but don't see any reference to clustering. Should I apply the hotfixes to each node or are the fixes cluster-aware?

Thanks.I also have a 2-node Active/Passive cluster (MSSQL 2005 64-bit on Windows 2003). I would like to apply the cumulative hotfix, but I too have not found any documentation specific to a clustered installation. Did you install the hotfix on your cluster? If yes, did you have any issues?

Cumulative Hotfix Package - Build 2153

I'm getting ready to install the Cumulative Hotfix Package - Build 2153 on a 2-node, Active/Passive cluster (MSSQL 2005 EE on Windows 2003). I've read through the docs a number of times but don't see any reference to clustering. Should I apply the hotfixes to each node or are the fixes cluster-aware?

Thanks.
I also have a 2-node Active/Passive cluster (MSSQL 2005 64-bit on Windows 2003). I would like to apply the cumulative hotfix, but I too have not found any documentation specific to a clustered installation. Did you install the hotfix on your cluster? If yes, did you have any issues?