Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MySQL


Advertisements:




SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







How Do I Increase A Cost By A Percentage?


currently training on SQL - doing alright so far until this sub-question...

Migrate all data from the JOB_COST table into the TOTAL_COST table. For those records that match the COST_ID, update the UPPER_LEVEL and increase the cost by 15%, otherwise insert the records.


View 2 Replies (Posted: August 7th, 2008, 06:25 PM)

Sponsored Links:

Related Forum Messages for MySQL:
Salary Increase Using Percentage?
I attempted to write a query showing a salary increase using %. The statement I used was;

UPDATE Employees set Salary = '10PERCENT' WHERE Emp_Id = '1';

However when I looked at the UPDATE in the Employees table the Salary was changed to 10. Not an increase of 10% to the original salary 10530.

Posted: January 10, 2010 06:45AM

View 1 Replies!   View Related
Using UPDATE To Increase A Decimal By A Percentage
I want to increase the prices of products in a database by 20%, I can work out how to do that with UPDATE but what I am wondering is, is it possible to specify a result with no decimal places i.e instead of 232.78 I would like 232.00 or (or .99).

Posted: February 13, 2006 07:05AM

View 1 Replies!   View Related
Least Cost Provider
The rows look like

1 TX CompanyA 2.25
2 TX CompanyB 2.00
3 NY CompanyB 3.00
4 TN CompanyA 1.25
5 TN CompanyB 1.50

to get the cheapest rate and provider for each location.

Results:
TX CompanyB 2.00
NY CompanyB 3.00
TN CompanyA 1.25

Posted: May 1, 2008, 08:04

View 3 Replies!   View Related
Cost Of Dropping A Lot Of Tables
Does anyone know if creating and dropping hundreds of tables per day will cause any degradation in database performance?

Posted: March 27, 2009 12:39PM

View 4 Replies!   View Related
Calculate Calls Cost
calculate costs of calls in my work..

I get the calls duration in seconds but I need to make the charging by minute
for example
30 second = 1 minute
110 secons = 2 minutes etc

Posted: April 15, 2009 08:00PM

View 1 Replies!   View Related
Cost Of License Per Server?
can I ask the cost of license MySQL per server?

Posted: 06-15-09, 04:37

View 2 Replies!   View Related
Cost Of Indexing Multiple Db Columns?
I'm writing an app with a MySQL table that indexes 3 columns. I'm concerned that after the table reaches a significant amount of records, the time to save a new record will be slow. Please inform how best to approach the indexing of columns.

UPDATE

I am indexing a point_value, the user_id, and an event_id, all required for client-facing purposes.For an
instance such as scoring baseball runs by player id and game id. What would be the cost of inserting about 200 new records a day, after the table holds records for two seasons, say 72,000 runs, and after 5 seasons, maybe a quarter million records? Only for illustration, but I'm expecting to insert between 25 and 200 records a day.

Posted: Jan 7 09 at 0:24

View 7 Replies!   View Related
What Is The Cost Of Using NULL In Database Columns
I use MySQL and SQLite often and plan on bringing more PostgreSQL into my workflow soon. With that in mind, what are the costs of using NULL in each database? I heard that MySQL adds an extra bit to each NULL column value to mark it as nullable.

Posted: Nov 30 10 at 4:11

View 1 Replies!   View Related
Query To Calculate Total Cost?
I have a table listsing_prices (id,listing_id,day_from,day_to,price) I need to calculate the total cost of an holiday in mysql becouse I need to sort the results by total cost.

EX:

VALUES IN TABLE
1 6 2011-04-27 2011-04-30 55,00
2 6 2011-05-01 2011-05-02 60,00
3 6 2011-05-03 2011-05-15 65,00

holiday from 2011-04-28 to 2011-05-05 total cost = 480

Posted: Apr 26 at 12:06

View 3 Replies!   View Related
Mac - Applescriptable Client - Low Cost Or Free?
Can anyone recommend a MySQL front end client or OS X that is AppleScriptable? Preferably low cost or free.

Posted: Sep 25 08 at 17:06

View 1 Replies!   View Related
100% CPU COST And Auto Creat Many Documents In DATA
mysql on windows 2003

when i delete all these files , and restart mysql service , it also created may files as :

#sql_7c0_0.MYD
#sql_7c0_0.MYI
#sql_1058_0.MYD
#sql_1058_0.MYI

error log:

090310 20:57:38 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 243222487.
InnoDB: Doing recovery: scanned up to log sequence number 0 243222487
090310 20:57:38 InnoDB: Started; log sequence number 0 243222487
090310 20:57:38 [Note] E:Program FilesMySQLMySQL Server 5.0inmysqld-nt: ready for connections.
Version: '5.0.45-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
090310 20:58:24 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
090310 20:58:25 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 243222487.
InnoDB: Doing recovery: scanned up to log sequence number 0 243222487
090310 20:58:26 InnoDB: Started; log sequence number 0 243222487
090310 20:58:26 [Note] E:Program FilesMySQLMySQL Server 5.0inmysqld-nt: ready for connections.
Version: '5.0.45-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
090310 20:59:48 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
090310 20:59:53 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 243222487.
InnoDB: Doing recovery: scanned up to log sequence number 0 243222487
090310 20:59:57 InnoDB: Started; log sequence number 0 243222487
090310 20:59:57 [Note] E:Program FilesMySQLMySQL Server 5.0inmysqld-nt: ready for connections.
Version: '5.0.45-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
090310 21:02:41 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
090310 21:02:44 InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 243222487.
InnoDB: Doing recovery: scanned up to log sequence number 0 243222487
090310 21:02:44 InnoDB: Started; log sequence number 0 243222487
090310 21:02:44 [Note] E:Program FilesMySQLMySQL Server 5.0inmysqld-nt: ready for

Posted: March 10, 2009 07:10AM

View 2 Replies!   View Related
Calculate Call Cost With A Query For Billing?
Has anyone or does anyone know how to calculate call charges from a call log table and tariff table in sql and put the output in a new table???

tariff rates for seconds or minutes. Could you provide some sample queries? Here is the code that I used to create the table with field names:

CREATE TABLE cdr (
accountcode VARCHAR (30),
src VARCHAR(64),
dst VARCHAR(64),
dcontext VARCHAR(32),
clid VARCHAR(32),
channel VARCHAR(32),

[Code]....

Posted: Apr 12 at 23:28

View 1 Replies!   View Related
Query On Using SUM And Limit For Calculating Usage And Cost?
I have a mysql database called sensor_data. Every 30 minutes a script inserts the power usage to this database and also the cost depending on the day/night tariff

Rec Date Time Reading Usage Cost Tar
2771 2010-12-20 16:00:00 RFXPower 67044.6 0.5 0.09 0.18

What I am looking for is a mysql query that will return the last hour hour power usage and cost. Another query will return the daily usage and cost. For the last query, it should simply sum the cost of the last two values in the cost column. I am trying todo this with the sum and limit, but I can't find how to limit the last 2 current records.

Posted: Dec 22 10 at 20:30

View 3 Replies!   View Related
Calculate MySQL Query Memory/CPU Cost?
Is there a way/tool/technique to calculate the processor and memory cost of a specific MySQL query?

Posted: Dec 13 09 at 22:53

View 1 Replies!   View Related
Profiling And Query Cost Tools And Techniques
Working with Microsoft SQL Server I found extremely useful SQL Server Profiler and Estimated Execution Plan (available in Management Studio) to optimize queries during development and production system monitoring. Are there similar tools (open source or commercial) or techniques available for MySQL?

Posted: Dec 3 08 at 8:24

View 2 Replies!   View Related
Free / Low Cost Webmail System Script To Install On Website
I am planning to launch a free webmail service at mail(dot)com(dot)es where users can signup and have their free webmail account (for example like [URL]. I am looking for a free or low cost webmail system script to install on my website. Do you know any free or low cost scripts which would be suitable for this?

Posted: Sep 19 09 at 13:04

View 5 Replies!   View Related
Cost Constant When Bulk Inserting Data Into An Indexed Table?
I have created an archive table which will store data for selecting only. Daily there will be a program to transfer a batch of records into the archive table. There are several columns which are indexed; while others are not.

I am concerned with time cost per batch insertion:
- 1st batch insertion: N1
- 2nd batch insertion: N2
- 3rd batch insertion: N3

The question is: will N1, N2, and N3 roughly be the same, or N3 > N2 > N1?

That is, will the time cost be a constant or incremental, with existence of several indexes?

[Code]...

Posted: Mar 19 10 at 14:28

View 1 Replies!   View Related
Query To Show All Categories With Total Cost Of Active Items For Category?
I have 2 tables in my database: item and category. Items can be active, or inactive, and have a categoryID that relates to the id of a record in the category table. i want to perform a query to show all the categories, with the total cost of active items for the category So my goal is to return something looking like this:

[Code....]

so as you can se, i would like to return the entire range of categories, even when the right table returns no matching results... Any takes for a million imaginary cool points?

Posted: Sep 9 10 at 21:36

View 2 Replies!   View Related
Percentage
I have a table of score which are 1's and 0's.

How would I go about writing a query to get the percentage of 1's against the toal number of records?

Posted: April 20th, 2007 02:55 PM

View 2 Replies!   View Related
Get Top X Percentage
I am trying to do a report that tells us our top selling products in a table where I already have the data compiled:
product_code, product_name, total_dollars

I would like to be able to query and say give me the top 50% of our products. Finding the top 50% in a dollar value is easy. Applying it to the table to return the best selling products until the sum of their total_dollars is equal to 50%.I'm usually pretty bad with mysql math, so I was hoping someone could help. I'm sure this is a fairly common mysql procedure, but I've never done it before...

Posted: January 26th, 2007, 05:44 PM

View 7 Replies!   View Related
Percentage On The Fly
My table now looks like this :

vote_id*, voter_id, vote_date, voter_ip, votee_id, title_id.

I have the first part of the query working ok

SELECT votee_id, title_id, COUNT( vote_id )
FROM jos_comprofiler_plug_fun2
WHERE votee_id =79
GROUP BY title_id;

Nice and simple it gives me the number of votes each title has according to a specific votee:

votee_id, title_id, COUNT( vote_id )
79, 1, 1
79, 2, 1
79 , 3, 4
79 , 4, 2
79 , 5, 1
79 , 6, 1

But how do I change this query to give me the percentage of votes each title has according to a specific votee?

Posted: October 03, 2008 08:17AM

View 7 Replies!   View Related
Calculating A Percentage
I'm working on an adp file and I'm trying to do is calculate what percentage one figure is of another figure in a view.
In access I would simply do it like this:

[FirstField]/[SecondField]*100

But this doesn't seem to work. My exact code is as follows:

SELECT Product, Quarter, TotalPlanProductSpend, TotalPlanSpend, TotalPlanProductSpend / TotalPlanSpend * 100 AS PercentOfTotal
FROM dbo.Qry_RptPlanPRoductSetup

Posted: March 24th, 2005, 10:29 AM

View 3 Replies!   View Related
Percentage Of Votes
i made a script for my buddy that his clients can vote and wright comments on his service.
in my database i have 3 fields

vote
comments
web

so vote is the votes rated and web is the rates rated for the web site.

now i want to extract the total percentage of votes?

i have a start..from searching on Google mysql percentage

SELECT (SUM( votes ) / COUNT( votes )) *100 percentage FROM `votes`

Posted: May 9th, 2008, 06:16 PM

View 14 Replies!   View Related
Returning A Percentage
is it possable to return ONLY 20% percent of the overall possable returns in a query? e.g. i have 100 possable returns and i only want 20% of them. So i'd receive 20 returns.

What i'm trying to do exactly is return the latest 30 entries and then the next 20% of the possable entries. i'm working with a database that has thousands of possable returns but i don't want all of them.

Posted: November 29th, 2004, 10:52 AM

View 2 Replies!   View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved