Showing posts with label million. Show all posts
Showing posts with label million. Show all posts

Monday, March 12, 2012

Million Seperator

Dear Sir,

I am Facing Problem with The number Format. Instaed of Thosand Separator I want Million Separator..

For Eg: in Crsyal Report The Number will Display Like this 5,633,000.00. Instaed of This format I want this Number to be display Like 56,33,000.00. How i can Do that,,

Thanks in Advance

AmbilyUse Formula field having this code

stringvar Amount:="453453455.00";
stringvar s:=mid(Amount,1,len(Amount)-3);
select len(s)
case 3 : s & ".00"
case 4 : left(s,1) & "," & right(s,3)& ".00"
case 5 : left(s,2) & "," & right(s,3)& ".00"
case 6 : left(s,1) & "," & mid(s,2,2) & "," & right(s,3)& ".00"
case 7 : left(s,2) & "," & mid(s,2,2) & "," & right(s,3)& ".00"
case 8 : left(s,1) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & right(s,3)& ".00"
case 9 : left(s,2) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & right(s,3)& ".00"
case 10 : left(s,1) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
default : s & ".00"

Madhivanan|||may i ask how to modify your script to get thousands separator?. i have case statement in my formula for differernt format. Don't want the .xx if they are both zeros.|||Hi 9e9+
Can you post the number and exepeted formated number?

Madhivanan|||Hi Madhi,

Thank you For your Fast Reply...

But i am Not Able to get the format..even though i analysed the function...but it is displaying The same format ,which crytsal report is giving.
Can u plz suggest any Other Function..|||Can you post the code you used?

Madhivanan|||Function (Currencyvar v1)
stringvar s:=mid(Totext(V1),2,len(Totext(V1))-4);
//stringvar str[100]=split(s,",");
//stringVar array str:=split(s,",");


//stringvar s=join(s2,",")

stringvar X:=mid(Totext(V1),Len(Totext(V1))-2,Len(Totext(V1)));
select len(S)
case 3 : s & X
case 4 : left(s,1) & "," & right(s,3)& X
case 5 : left(s,2) & "," & right(s,3)& X
case 6 : left(s,1) & "," & mid(s,2,2) & "," & right(s,3)&X
case 7 : left(s,2) & "," & mid(s,3,2) & "," & right(s,3)& X
case 8 : left(s,1) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & right(s,3)& X
case 9 : left(s,2) & "," & mid(s,3,2) & "," & mid(s,5,2) & "," & right(s,3)& X
case 10 : left(s,1) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & mid(s,6,2) & "," & right(s,3)& X
default : s & ".00" ;

This is the code i used. I rewrote the code bcecoz, By default The crystal report is taking $ symbol also with the Number format.
Now i am struggling becoz it will take the Thousand Seperator (,) also. So while taking leng\th , it will count The & symbol and Thousand seperator.
I dont want those...
So i am trying to Split the Number into array (,) and Join again with out Commas.
Can you help me.
I cant change the Reprt options again..coz already 150+ reports addaed..Now for all reports i hav to Update this Format..
or pls suggest me, any short cut method is available ...
Thanks
Ambily|||Hi Mr Madhi,

Thanks a Lot for ur Support.. The problem was Simple...But It troubled a Lot
I wrote A functon with ur code

Function (Currencyvar v1)
Numbervar A:=(Tonumber(V1));
stringvar s:=Totext(A);
stringvar X:=mid(Totext(V1),Len(Totext(V1))-2,Len(Totext(V1)));
select len(s)
case 3 : s & X
case 4 : left(s,1) & "," & right(s,3)& X
case 5 : left(s,2) & "," & right(s,3)& X
case 6 : left(s,1) & "," & mid(s,2,2) & "," & right(s,3)&X
case 7 : left(s,2) & "," & mid(s,3,2) & "," & right(s,3)& X
case 8 : left(s,1) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & right(s,3)& X
case 9 : left(s,2) & "," & mid(s,3,2) & "," & mid(s,4,2) & "," & right(s,3)& X
case 10 : left(s,1) & "," & mid(s,2,2) & "," & mid(s,4,2) & "," & mid(s,6,2) & "," & right(s,3)& X
default : s & ".00" ;

Now i am getting The currency format , which i need

Once again Thanks!!!

Ambily

million rows user table and growing

For our web site, we now have a million users and we have one user table
right now..
We would like to consider scaling this out as we grow to 5 -10 million users
and not have it in one table.
Every time a user logs on or changes profile,etc, we dont want to cause
contention or blocking on this table.. so whats the best way to go about
this ?
If i partition the table, whats the best way to go about partitioning it ?
Thanks> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
As long as you have appropriate indexing, I wouldn't expect performance or
concurrency problems regardless of table size. A few million rows really
isn't that large nowadays and, in my option, doesn't warrant partitioning.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <hassan@.test.com> wrote in message
news:%23ytph$8XIHA.4196@.TK2MSFTNGP04.phx.gbl...
> For our web site, we now have a million users and we have one user table
> right now..
> We would like to consider scaling this out as we grow to 5 -10 million
> users and not have it in one table.
> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
> If i partition the table, whats the best way to go about partitioning it ?
> Thanks|||Perhaps your company should consider hiring an experienced DBA' One that
can guide you proactively instead of reactively and successfully get you to
the level you wish to achieve.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Hassan" <hassan@.test.com> wrote in message
news:%23ytph$8XIHA.4196@.TK2MSFTNGP04.phx.gbl...
> For our web site, we now have a million users and we have one user table
> right now..
> We would like to consider scaling this out as we grow to 5 -10 million
> users and not have it in one table.
> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
> If i partition the table, whats the best way to go about partitioning it ?
> Thanks|||Focus on indexing strategy , statistics , as 1 million rows is not that
much.
--
Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com
"Hassan" <hassan@.test.com> wrote in message
news:%23ytph$8XIHA.4196@.TK2MSFTNGP04.phx.gbl...
> For our web site, we now have a million users and we have one user table
> right now..
> We would like to consider scaling this out as we grow to 5 -10 million
> users and not have it in one table.
> Every time a user logs on or changes profile,etc, we dont want to cause
> contention or blocking on this table.. so whats the best way to go about
> this ?
> If i partition the table, whats the best way to go about partitioning it ?
> Thanks

Million records table

Hi everybody,
I set up a merge replication on Sql2K with one publisher/distributor
and 6 anonymous subscribers that run msde.
The db is growing bigger and bigger and i can't understand why.
I noticed that some of the MS_xxxxx tables are very large: in
particular one is 16.7 millions and another over 770K. Is there a way
to reduce/shrink these tables?
Thanks
Lorenzo
How many rows are being modified (inserted/updated/deleted) in the replicated
articles? I would expect this to be a similar order of magnitude to the
msmerge-contents, msmerge_tombstone tables. These tables will be
automatically cleared down during synchronization as part of the meta data
cleanup naturally run in merge by sp_mergemetadataretentioncleanup so
normally you don't need to do anything - the rows will be removed as they
reach the retention period defined in the publication.
HTH,
Paul Ibison
|||On 17 Mag, 17:32, Paul Ibison <Paul.Ibi...@.Pygmalion.Com> wrote:
> How many rows are being modified (inserted/updated/deleted) in the replicated
> articles? I would expect this to be a similar order of magnitude to the
> msmerge-contents, msmerge_tombstone tables. These tables will be
> automatically cleared down during synchronization as part of the meta data
> cleanup naturally run in merge by sp_mergemetadataretentioncleanup so
> normally you don't need to do anything - the rows will be removed as they
> reach the retention period defined in the publication.
> HTH,
> Paul Ibison
Hi Paul,
i don't know exactly haw many rows are being modified, but i can tell
you that the largest replicated table counts less than 130000 records
and i'm sure only a small part of these are changed/added/deleted
the msmerge_tombstone now counts almost 7 millions rows
i'm having some timeout troubles when i synchronize and i often get
the "can't enumerate changes" error
now i'm checking all my tables and indexes to see if some are missing
(the publication is partitioned with dynamic filtering)
thanks a lot for your help
lorenzo
|||Paul Ibison:
> I'd do a join between the msmerge_tombstone table and sysmergearticles. Make
> it a group by on article name and count the records per article then compare
> this to the rowcounts. It may be that there are other articles/publications
> contributing that you haven't accounted for, but even if not, this should
> clarify the situation a bit.
> HTH,
> Paul Ibison
that was a great idea, Paul
i found that there are over 5 million rows relating to a view that
returns 4800!
now i know what to investigate ;-)

Million Records Problem

Is there any way or approach on handling reports with million of records retrieved?

Had a problem for 25 silmultaneous users accessing the report.
Problems are:
- Timeout Expired.
- Server unavailable.
- Page cannot be displayed.

Please let me know if there is... Thanks in advance...

You should set the report to execute from a snapshot, otherwise each user access results in another 1M rows put into memory.

|||I am curious... why do your users want to see all million rows? Is it possible to reduce the amount of data coming into the report server by pushing filters down into the query expressions?