Search Results

Search found 5942 results on 238 pages for 'total starnger'.

Page 4/238 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Optimization of running total calculation in SQL for multiple values per join condition

    - by Kiril
    I have the following table (test_table): date value --------------- d1 10.0 d1 20.0 d2 60.0 d2 10.0 d2 -20.0 d3 40.0 I calculate the running total as follows. I use the same query twice, because first I need to calculate the values for a specifi date, and afterwards I can calculate the running total. Otherwise, joining the two tables where date is not unique, I would get too many results from the join: SELECT t1.date, SUM(t2.value) AS total FROM (SELECT date, SUM(value) AS value FROM test_table GROUP BY date) AS t1 JOIN (SELECT date, SUM(value) AS value FROM test_table GROUP BY date) AS t2 ON t1.date >= t2.date GROUP BY t1.date ORDER BY t1.date This gives me (which is fine): date total ------------- d1 30.0 d2 80.0 d3 120.0 BUT, this query isn't very efficient, because I need to change conditions in two places, if necessary. In production, the test_table is a lot bigger ( 4 Mio. rows), and the query takes too much time to complete. Question: How can I avoid using the same query twice?

    Read the article

  • add new column in birt report based on generated grand total column in crosstab

    - by Sanga
    Hi there, Thanks for reading my question. Please I need your help here. I am trying to add a column that is based on a cross-tab's grand total. The cross-tab was added by clicking on the totals option for the column. Now I want to use this total for another calculation in my cross-tab but its so difficult adding a column after the grand total column. Secondly its difficult getting a reference to the results in the grand total column. Please what do you advice? Thanks Ime

    Read the article

  • Changing text depending on rounded total from database

    - by NeonBlue Bliss
    On a website I have a number of small PHP scripts to automate changes to the text of the site, depending on a figure that's calculated from a MySQL database. The site is for a fundraising group, and the text in question on the home page gives the total amount raised. The amount raised is pulled from the database and rounded to the nearest thousand. This is the PHP I use to round the figure and find the last three digits of the total: $query4 = mysql_query("SELECT SUM(amountraised) AS full_total FROM fundraisingtotal;"); $result4 = mysql_fetch_array($query4); $fulltotal = $result4["full_total"]; $num = $fulltotal + 30000; $ftotalr = round($num,-3); $roundnum = round($num); $string = $roundnum; $length = strlen($string); $characters = 3; $start = $length - $characters; $string = substr($string , $start ,$characters); $figure = $string; (£30,000 is the amount that had been raised by the previous fundraising team from when the project first started, which is why I've added 30000 to $fulltotal for the $num variable) Currently the text reads: the bookstall and other fundraising events have raised more than &pound;<? echo number_format($ftotalr); ?> I've just realised though that because the PHP is rounding to the nearest thousand, if the total's for example £39,200 and it's rounded to £40,000, to say it's more than £40,000 is incorrect, and in that case I'd need it to say 'almost £40,000' or something similar. I obviously need to replace the 'more than' with a variable. Obviously I need to test whether the last three digits of the total are nearer to 0 or 1000, so that if the total was for example £39,2000, the text would read 'just over', if it was between £39,250 and £39,400 something like 'over', between £39,400 and £39,700 something like 'well over', and between £39,700 and £39,999, 'almost.' I've managed to get the last three digits of the total as a variable, and I think I need some sort of an if/else/elseif code block (not sure if that would be the right approach, or whether to use case/break), and obviously I'm going to have to check whether the figure meets each of the criteria, but I can't figure out how to do that. Could anyone suggest what would be the best way to do this please?

    Read the article

  • How to exclude hidden row vaue from total value SSRS

    - by Annmarie
    I have an SSRS project and I want to exclude a row that I have hidden from the total. I have hidden the row based on an expression on the row visibility, where the row is hidden if: =IIF(IIF(ReportItems!CUST_CNT2.Value = 0, 0, ReportItems!Total_Contribution5.Value / IIF(ReportItems!CUST_CNT2.Value = 0, 1, ReportItems!CUST_CNT2.Value)) > 0, True, False) So basically the column totals for the report just total up all rows including this above row that I have hidden, and I need the total to exclude this row. Any ideas?

    Read the article

  • find total of grid view

    - by thiru
    hi how to find a total in grid view cell value. consider in grid view there are 3 rows are there named as row1 , row2 , and row3. here i want to find a total of row1 contains 7 colomns named as m1,m2,m3,m4,m5,m6,m7 find the total of these colomns and display in to textbox thanks.

    Read the article

  • issue displaying total row on devexpress pivot grid when paging

    - by Leonardo Raygoza
    Hi, I'm working with devexpress pivot grid, so I added the paging function and everything is working fine, the only thing I need to do is display the total row on each page, at this moment it is displayed just in the last one, I was looking on DevExpress documentation and it looks like pivot grid calculate the total and gran total automatically and I don't find any thing about my task, anybody knows how can I do this??? Regards Leo

    Read the article

  • Total Number of records required in paged .NET datagrid control

    - by sumitchauhan
    I am using a data grid and has bound a data source with it. I am trying to get the total number of records in the grid in overriden InitializePager method from pagedDataSource DataSourceCount. I thought DataSourceCount returns number of records from SelectCountMethod of ObjectDataSource, but DataSourceCount is giving me the page size and not the total number of records, whereas when I debug and see in SelectCountMethod it is returning correct number of total Records. I am not sure how to get the data from SelectCountMethod in DataGrid.

    Read the article

  • jQuery calculate total on change

    - by mapet
    amount A. 2 B. 3 C. 3 Quantity A. 4 B. 5 C. 2 Total A. 6 B. 8 C. 5 sum(19) i need some idea of script and method of jquery to make this simple i have already done the edit function of amount and Quantity. but its really hard for me to sum up the amount + quantity = total and sum(total). any idea guys? :(

    Read the article

  • How to list rpm packages/subpackages sorted by total size

    - by smci
    Looking for an easy way to postprocess rpm -q output so it reports the total size of all subpackages matching a regexp, e.g. see the aspell* example below. (Short of scripting it with Python/PERL/awk, which is the next step) (Motivation: I'm trying to remove a few Gb of unnecessary packages from a CentOS install, so I'm trying to track down things that are a) large b) unnecessary and c) not dependencies of anything useful like gnome. Ultimately I want to pipe the ouput through sort -n to what the space hogs are, before doing rpm -e) My reporting command looks like [1]: cat unwanted | xargs rpm -q --qf '%9.{size} %{name}\n' > unwanted.size and here's just one example where I'd like to see rpm's total for all aspell* subpackages: root# rpm -q --qf '%9.{size} %{name}\n' `rpm -qa | grep aspell` 1040974 aspell 16417158 aspell-es 4862676 aspell-sv 4334067 aspell-en 23329116 aspell-fr 13075210 aspell-de 39342410 aspell-it 8655094 aspell-ca 62267635 aspell-cs 16714477 aspell-da 17579484 aspell-el 10625591 aspell-no 60719347 aspell-pl 12907088 aspell-pt 8007946 aspell-nl 9425163 aspell-cy Three extra nice-to-have things: list the dependencies/depending packages of each group (so I can figure out the uninstall order) Also, if you could group them by package group, that would be totally neat. Human-readable size units like 'M'/'G' (like ls -h does). Can be done with regexp and rounding on the size field. Footnote: I'm surprised up2date and yum don't add this sort of intelligence. Ideally you would want to see a tree of group-package-subpackage, with rolled-up sizes. Footnote 2: I see yum erase aspell* does actually produce this summary - but not in a query command. [1] where unwanted.txt is a textfile of unnecessary packages obtained by diffing the output of: yum list installed | sed -e 's/\..*//g' > installed.txt diff --suppress-common-lines centos4_minimal.txt installed.txt | grep '>' and centos4_minimal.txt came from the Google doc given by that helpful blogger.

    Read the article

  • Pivot tables: How can I total the subtotal?

    - by Mike
    Person A needs £115, Person D £234 and Person G £789, but how do I SUM that and get it to show on the same ROW as the subtotal? The Rows are subscription names. The Value field holds the Cost per subscription. the Columns holds the name of the person who receives the subscription. I have GROUPED on YEAR & MONTH, and have a subtotal that shows me how much each person will need to pay each month for all their subscriptions, but I need a figure showing me the total of all the subscriptions per month. I've tried adding calculated fields, but I want to SUM the subtotals so I'm struggling to see the field I need to use. I've tried Grand Totals but that SUMS all rows and I really only want SUM the Subtotal Total Row. I need a nice neat report that my managers won't go white at when looking at it...to many numbers = fear and confusion. Anyway it got messy, so I've come for help. Cheers Mike.

    Read the article

  • Pivot Table grand total across columns

    - by Jon
    I'm using Excel 2010 and Power Pivot. I'm trying to calculate confidence and velocity for a development team. I'm extracting some information from our time and defect system each day and building a data set. What I need to do with Excel is do the calculations. So each day I add to my data set 1 row per task in the current project, estimate for that task and the time spent on that task. What I want to calculate is the estimate/actual for each task but also for each person. The trouble is that each day the actual is cumulative so I need to pick out the maximum value for each task. The estimate should remain unchanged. I can make this work at the task level with a calculated measure (=MAX(worked)/MAX(estimate)) but I don't know how to total this up for a person. I need the sum of the max worked for each task. So a dataset might look like: Name Task Estimate Worked N1 T1 3 1 N2 T2 3 1 N3 T3 4 1 N1 T1 3 2 N2 T4 5 1 N3 T3 4 2 N1 T5 1 2 N2 T6 2 3 N3 T7 3 2 What I want to see is for task T1 2 days were worked against an estimate of 3 days - so 2/3. For person N1 I want to see that they worked a total of 4 days against an estimate of 4 days so 4/4. For person N2 they worked 5 days for an estimate of 10 days. Any ideas on how I can achieve this?

    Read the article

  • JavaScript Coding for Finding Shipping Total

    - by user2913279
    I am having a very hard time with this code. I have been working on it for days and cannot seem to figure it out. Please help!! Here are the specific I need for the code: Many companies normally charge a shipping and handling charge for purchases. Create a Web page that allows a user to enter a purchase price into a text box and includes a JavaScript function that calculates shipping and handling. Add functionality to the script that adds a minimum shipping and handling charge of $1.50 for any purchase that is less than or equal to $25.00. For any orders over $25.00, add 10% to the total purchase price for shipping and handling, but do not include the $1.50 minimum shipping and handling charge. The formula for calculating a percentage is price * percent / 100. For example, the formula for calculating 10% of a $50.00 purchase price is 50 * 10 / 100, which results in a shipping and handling charge of $5.00. After you determine the total cost of the order (purchase plus shipping and handling), display it in an alert dialog box. Here is the code I have: <!DOCTYPE> <head> <title>Calculate Shipping</title> <script type="text/javascript"> function parseInt() { var salesPrice = document.salesForm.Price.value; var minCharge = salesPrice + 1.50; var shipping = salesPrice * 10/100; if (salesPrice <= 25) window.alert('Your sales total including shipping is $' + minCharge); else window.alert('Your sales total including shipping is $' + salesPrice + shipping); } </script> </head> <body> <form name="salesForm"> <div > <p>Enter Your Purchase Price</p> <input type="text" name="Price" /><br /><br /> <input type="button" name="Calculate" value="Calculate Shipping" onclick="parseInt ()" /> </div> </form> </body> </html> Everything works except for the math in the alert box. It will show an incorrect total...

    Read the article

  • List total memusage by 32bit programs and 64bit programs

    - by egon
    How to get the total amount of memory used by 32bit applications and 64bit applications from the command line in Windows. I tried using tasklist /FI "MODULES eq wow64.dll" /FO CSV and then parsing the output and summing. But tasklist just freezes with any command that has something to do with modules (tasklist /m and tasklist /fi "modules eq wow64.dll" freeze). Are there any alternatives? Or some idea why tasklist freezes.

    Read the article

  • How to monitor the total number of SQL Server logins

    - by Shiraz Bhaiji
    We have an SQL Server 2005 that is the backend of a web application. The application is partly SharePoint and partly web services accessing the database via Entity Framework. In the performance monitor I am seeing average SQL Logins is ca, 60 per second (max 170), but the average logouts is less than 1. Where can I see the total number of SQL Server logins? Anyone have an idea what could be causing this?

    Read the article

  • Windows Media Player - always show Current Time/Total Time

    - by Siim K
    I'm using Windows Media Player 12 on Windows 7. When I open a video file then it by default only shows the current position (time). If I click on it once then it changes to format Current Time / Total Time Is there any way to make this format permanent (registry hack/some setting I have not noticed)? Right now every time I close WMP and open another file it's back to the default (only current time) setting.

    Read the article

  • Exchange 2010 EMS - Total size of users mailboxes within a particular OU

    - by Moif Murphy
    I'm doing some massive DB cleanups at the moment. We have two DBs both approaching 400GB and I'm wanting to split the DB's into departments. To do that I need to know the total size of mailboxes within an OU. I've run this: http://stackoverflow.com/questions/9796101/exchange-listing-mailboxes-in-an-ou-with-their-mailbox-size but this only gives me a list and I need a combined totalitemsize so know how big I need the new DB's to be. Thanks

    Read the article

  • limit the total number of emails per domain per hour / per day

    - by air
    i have windows 2008 server with Mail Enable Free edition with plesk 9.5. what i want is: to limit each domain with total number of emails per hour / per day to avoid spam. i know its possible in Mail Enable Ent Version which is not free.( i don't want to pay right now) is this possible or i have to use any other script. is this possible in hMail server? Thanks

    Read the article

  • limit the total number of emails per domain per hour / per day

    - by user20989
    i have windows 2008 server with Mail Enable Free edition with plesk 9.5. what i want is: to limit each domain with total number of emails per hour / per day to avoid spam. i know its possible in Mail Enable Ent Version which is not free.( i don't want to pay right now) is this possible or i have to use any other script. is this possible in hMail server? Thanks

    Read the article

  • Insert total number of slides in powerpoint 2007

    - by Bob Rivers
    Hi, Is it possible to insert to total amount of slides in a powerpoint footnote? I'm looking for an automated way. Of couse that I could edit the footer and put it manually, but, if I increase/decrease it, I would be necessary to adjust it. And this is something that we always forget. The help at MS explains how to do it manually. I can't believe that powerpoint doesn't have it... TIA, Bob

    Read the article

  • Why is the Task Manager Total Physical Memory not 2048 MB or 2 GB

    - by Dorothy
    I found 3 numbers for the Total Physical Memory: In the Task Manager under the Performance tab: 1978 MB In Computer Properties: 2 GB And running wmic computersystem get TotalPhysicalMemory /format:list in the command line: 2074554368 Bites Number 1 matches Number 3 except Number 1 is rounded. When I convert Number 3 to GB 2074554368 / 1024 / 1024 / 1024 I don't quite get 2 GB. I get 1.93207932 GB. Why does Number 1 and Number 3 not match Number 2?

    Read the article

  • very quickly getting total size of folder

    - by freakazo
    I want to quickly find the total size of any folder using python. def GetFolderSize(path): TotalSize = 0 for item in os.walk(path): for file in item[2]: try: TotalSize = TotalSize + getsize(join(item[0], file)) except: print("error with file: " + join(item[0], file)) return TotalSize That's the simple script I wrote to get the total size of the folder, it took around 60 seconds (+-5 seconds). By using multiprocessing I got it down to 23 seconds on a quad core machine. Using the Windows file explorer it takes only ~3 seconds (Right click- properties to see for yourself). So is there a faster way of finding the total size of a folder close to the speed that windows can do it? Windows 7, python 2.6 (Did searches but most of the time people used a very similar method to my own) Thanks in advance.

    Read the article

  • Double of Total Problem

    - by Gopal
    Table1 ID | WorkTime ----------------- 001 | 10:50:00 001 | 00:00:00 002 | .... WorkTime Datatype is *varchar(. SELECT ID, CONVERT(varchar(10), TotalSeconds1 / 3600) + ':' + RIGHT('00' + CONVERT(varchar(2), (TotalSeconds1 - TotalSeconds1 / 3600 * 3600) / 60), 2) + ':' + RIGHT('00' + CONVERT(varchar(2), TotalSeconds1 - (TotalSeconds1 / 3600 * 3600 + (TotalSeconds1 - TotalSeconds1 / 3600 * 3600) / 60 * 60)), 2) AS TotalWork From ( SELECT ID, SUM(DATEDIFF(second, CONVERT(datetime, '1/1/1900'), CONVERT(datetime, '1/1/1900 ' + WorkTime))) AS TotalSeconds1 FROM table1 group by ID) AS tab1 where id = '001' The above Query is showing "double the total of time" For Example From table1 i want to calculate the total WorkTime, when i run the above query it is showing ID WorkTime 001 21:40:00 002..., But it should show like this ID Worktime 001 10:50:00 ..., How to avoid the double total of worktime. How to modify my query. Need Query Help

    Read the article

  • How to get total cpu usage in Linux (c++)

    - by cz-david
    I am trying to get total cpu usage in %. First I should start by saying that "top" will simply not do, as there is a delay between cpu dumps, it requires 2 dumps and several seconds, which hangs my program (I do not want to give it its own thread) next thing what I tried is "ps" which is instant but always gives very high number in total (20+) and when I actually got my cpu to do something it stayed at about 20... Is there any other way that I could get total cpu usage? It does not matter if it is over one second or longer periods of time... Longer periods would be more useful, though.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >