Ed,
That's not really what I meant. I know what the function SUM() does. But Sum() takes an _expression_ and '1' doesn't seem like much of an _expression_ to me. So what is that 1 equates to and where in the MySQL documentation can I find this explained.
The _expression_ here is '1', whi
Ed Reed wrote:
That's not really what I meant. I know what the function SUM() does. But Sum()
takes an expression and '1' doesn't seem like much of an expression to me. So
what is that 1 equates to and where in the MySQL documentation can I find this
explained.
Thanks again.
It doesn't car
That's not really what I meant. I know what the function SUM() does. But Sum()
takes an expression and '1' doesn't seem like much of an expression to me. So
what is that 1 equates to and where in the MySQL documentation can I find this
explained.
Thanks again.
>>> Peter Brawley <[EMAIL PROTEC
Hi Ed,
Count(1) works just as well. Sum(1) just adds 1 for each row so it's
logically equivalent.
PB
-
Ed Reed wrote:
WOW!!! THAT WAS AWESOME!!!
Thanks a lot Peter. Ok, so what is SUM(1)? How is it able to do this? And where can I learn more about it?
Thanks again.
WOW!!! THAT WAS AWESOME!!!
Thanks a lot Peter. Ok, so what is SUM(1)? How is it able to do this? And where
can I learn more about it?
Thanks again.
>>> Peter Brawley <[EMAIL PROTECTED]> 4/4/06 10:13:00 PM >>>
Ed,e: Thanks for the quick reply Peter. Unfortunately, this is all legacy stuff
th
You must be able to run it as a single call, or as a single TRANSACTION?
What do you mean by "single call"? One PHP command? One command on
the commandline? one script run?
-Sheeri
On 4/4/06, Ed Reed <[EMAIL PROTECTED]> wrote:
> Thanks for the quick reply Peter. Unfortunately, this is all leg
Ed,e:
Thanks for the quick reply Peter. Unfortunately, this is all legacy stuff that I have to make work together and the problemreport table does not reference the employeeid in the employees table. It was all create about ten years ago and the data has just always been migrated to the db d
Thanks for the quick reply Peter. Unfortunately, this is all legacy stuff that
I have to make work together and the problemreport table does not reference the
employeeid in the employees table. It was all create about ten years ago and
the data has just always been migrated to the db du jour. I'
Ed,
>Can someone help me simplify this query please? It's meant
>to return a single string result that looks something like this,
>"You have 12 open Problem Reports: Priorities(High=5, Med=6, Low=1)"
The big slowdown in your query is likely the join on
ProblemReports.Responsible = CONCAT
Sorry, here's the results. BTW the query works it just seems overly complex and
I'd like to streamline it.
CREATE TABLE `employees` (
`EmployeeID` int(11) NOT NULL auto_increment,
`FirstName` varchar(50) default NULL,
`LastName` varchar(50) default NULL,
`DateTerminated` datetime default
"Ed Reed" <[EMAIL PROTECTED]> wrote on 04/04/2006 04:34:29 PM:
> Can someone help me simplify this query please? It's meant to return
> a single string result that looks something like this,
>
> "You have 12 open Problem Reports: Priorities(High=5, Med=6, Low=1)"
>
> The relavent columns from th
11 matches
Mail list logo