My Left Joins are Doubling the SUM()
SELECT packageItemID, packageItemName,packageItemPrice
,SUM(packageItemTaxAmount) as packageItemTaxAmount
,SUM(packageCreditAmount) as packageCreditAmount
FROM packageItem
LEFT JOIN packageCredit ON packageItemID=packageCreditItemID
LEFT JOIN packageItemTax O
Dear Friends,
I run several processes and they need to query the mysql 5.0.8 database
simultaneously .I have a config table which have the record id. I need to
fetch that and increment that .What I feel that the same record id is
fetched by different simultaneosly before i update .Can anyone help m
Okay, well it turns out that this works exactly how I want/expect it to. The
documentation was a bit confusing.
SELECT a.*,
DATE_FORMAT(a.created_on,'%m/%d/%y %h:%i:%s %p') AS
created_on_format,
DATE_FORMAT(a.timestamp,'%m/%d/%y %h:%i:%s %p') AS timestamp_format,
(@tv:=
[snip]
Here is a paired down version of a query I want to make. How can I get
the
"grandtotal" column? I know about the "HAVING" clause, but that's only
going
to be good for weeding out rows I don't want. I just want to do some
basic
math here.
[/snip]
More http://dev.mysql.com/doc/refman/5.1/en/e
[snip]
Here is a paired down version of a query I want to make. How can I get
the
"grandtotal" column? I know about the "HAVING" clause, but that's only
going
to be good for weeding out rows I don't want. I just want to do some
basic
math here.
SELECT a.*,
DATE_FORMAT(a.created_on,'%m/%d
To add to this, I will also want to be able to "ORDER BY" those three new
columns (totalviews, totalclicks, grandtotal) as well.. I'm using mySQL 5
and innodb tables.
I saw this page:
http://dev.mysql.com/doc/refman/5.0/en/user-variables.html
But it says:
"
Note: In a SELECT statement, each expre
Here is a paired down version of a query I want to make. How can I get the
"grandtotal" column? I know about the "HAVING" clause, but that's only going
to be good for weeding out rows I don't want. I just want to do some basic
math here.
SELECT a.*,
DATE_FORMAT(a.created_on,'%m/%d/%y %h:
If the ID doesn't represent anything, you can
CREATE TABLE new_table SELECT DISTINCT Row1, Row2 FROM old_table
And then recreate your index(es).
All your autoincrement IDs will be changed.
On 4/17/06, Patrick Aljord <[EMAIL PROTECTED]> wrote:
>
> On 4/18/06, William Fong <[EMAIL PROTECTED]> wr
Randy Paries wrote:
> Hello,
> I have just created a new fedora 4 box with the latest mysqldump
> mysqldump Ver 10.9
>
> something has changed.
>
> Before all my tables entries had their own insert statements for each
> row. Now each table has one insert with all the values appended to the
> en
Hello,
I have just created a new fedora 4 box with the latest mysqldump
mysqldump Ver 10.9
something has changed.
Before all my tables entries had their own insert statements for each
row. Now each table has one insert with all the values appended to the
end.
is there switch that puts it back t
Sample Data:
ID-Row1-Row2
1-A-B
2-A-B
Row1 and Row2 are duplicate, so you only want one. Which ID do you want?
-will
On 4/17/06, Patrick Aljord <[EMAIL PROTECTED]> wrote:
>
> hey all,
> I have a table "mytable" that looks like this:
> id tinyint primary key auto_increment
> row1 varchar 15
hey all,
I have a table "mytable" that looks like this:
id tinyint primary key auto_increment
row1 varchar 150
row2 varchar 150
I would like to remove all duplicates, which means that if n records
have the same row1 and row2, keep only one record and remove the
duplicates. Any idea how to do this?
Hi.
Thanks for your response>
[EMAIL PROTECTED] wrote:
Do you have any idexes on the table?
No.
The table looks like this.
Would there be any advantage in creating indexes for it?
| id | | LastUpdated|
| 32957c615b37b5674f99d1cfd06d6a23 | | 2006041607561
Michael,
I use OpenVPN for all our mysql replication to across WAN links. This is
entirely on Linux. We did have weird problems with UDP but they were entirely
solved by using TCP. The OpenVPN/cpu usage is never the limiting factor on
replication. We do have a full T1 though so bandwidth issu
Hi,
thanx for looking into this issue
OS version: Red Hat Enterprise Linux AS release 3 (Taroon Update 3)
mysql : mysql-3.23.58-pc-linux-i686.tar.gz
I need to write an uninstall script for this,since it is to be done on many
systems.
and then install mysql 5 binary.
Thanks,
[EMAIL
On Mon, Apr 17, 2006 at 11:26:38AM +0800, 古雷 wrote:
> Hello:
>
> For example:
> What does "Web Access" and "Remote Troubleshooting" mean in this page
> https://shop.mysql.com/network.html?rz=s2
'Web Access' means you have access to the web-based support system.
'Remote Troubleshooting' means tha
Mytop was written by Jeremy for Mysql 3.x, 4.0, and 4.1 , it is not fully
compatible with 5.0, but to just get the values you requested, all you need
to do is a small hack of the code
1)# which mytop ( to locate your mytop executable)
2) open the file for editong (i.e. vi "mytop' (or use your favou
徐晶 wrote:
Hi,
I want to know how I can connect to MySQL with ODBC driver? Is there
something else to be installed besides MySQL for Windows?
http://dev.mysql.com/doc/refman/5.1/en/odbc-connector.html
PB
Thanks a lot!
Best Wishes,
--
John Xu, EE, BUPT, P.R. China
北
Thanks Rich.
On Mon, 2006-04-17 at 08:28 -0500, Duzenbury, Rich wrote:
> I just did this last week on a 5.0.18 machine. It's supported by the
> mysqlmanager out of the box. Here are a copy of my notes, and worked
> well on a Suse machine. The locations of your files may not be the
> same.
>
>
I just did this last week on a 5.0.18 machine. It's supported by the
mysqlmanager out of the box. Here are a copy of my notes, and worked
well on a Suse machine. The locations of your files may not be the
same.
# stop the server, if running
/etc/init.d/mysql stop
# edit /etc/my.cnf to set up t
Hi everyone.
I used to run mysql on a local server here, which has some databases
which are very important to me on it. The server was running mysql
on Arch Linux, but unfortunatly this crashed, I was not able to
rebuild the operating system but I was able to recover the raw
database files of
Hi Chris,
Looks like you may have to either upgrade your current server to the
version the Arch Linux was running or install a second temp server of
that version, export the databases and then import them into the ver 3.2
server.
Personally, I'd look closely at upgrading if at all possible.
Rega
This is software I use:
D:\MD>mysql --version
mysql Ver 14.7 Distrib 4.1.12, for Win32 (ia32)
C:\Apache\Apache2\bin>Apache.exe -v
Server version: Apache/2.0.54
Server built: Apr 16 2005 14:25:31
C:\Apache\Apache2\bin>ver
Microsoft Windows 2000 [Version 5.00.2195]
Exactly which parameters
Hi everyone.
I used to run mysql on a local server here, which has some databases
which are very important to me on it. The server was running mysql on
Arch Linux, but unfortunatly this crashed, I was not able to rebuild the
operating system but I was able to recover the raw database files off
Hi,
Iam using mytop script to monitor the processes on mysql server. This is
output from mytop:
MySQL on localhost (5.0.15-standard-log)
up 0+02:24:46 [13:08:20]
Queries: 22.6M qps: 2733 Slow: 0.0 Se/In/Up/De(%):
00/00/00/00
qps now: 2801 Slow qps: 0.0 Threads:8 (
On 4/16/06, Nicolas Verhaeghe <[EMAIL PROTECTED]> wrote:
> I am slowly considering leaving GoDaddy, who has a very good bandwidth and
> ok tech support (I have seen better but much much worse) and acceptable
> prices, but unfortunately does not support MySQL 5 and PHP 5 either.
>
> I wonder if I co
It would be helful if you could tell us what OS you are
using please? Your email address suggests you could be
running some flavour of Linux?
If so, can you tell us what package management system your
OS uses?
I run SuSE Linux 9.2 pro, which uses the Redhat Package
Management system - RPM.
Do
27 matches
Mail list logo