Re: Function Question

2011-01-12 Thread mos
Have you tried: select UserName, Sum(ColB) from Table group by UserName; or select UserName, Sum(ColB) from Table group by UserName where UserName="Emily"; Mike At 11:43 AM 1/12/2011, Nicholas Moreno wrote: My issue is actually in Excel. I'm hoping someone could help me... I need to to

Function Question

2011-01-12 Thread Nicholas Moreno
My issue is actually in Excel. I'm hoping someone could help me... I need to total the values in column B for "Emily". Is there a way other than =SUM (B1+B2+B4+B7)? -- Emily | 1 - Emily | 5 - Greg | 2 - Bob | 7 - Emily | 4 ---

Stored Procedure/Function Question

2010-02-17 Thread Steve Staples
Hi there, I have a WEIRD question, that I can't find an answer too... Here is my stored function: DELIMITER $$ USE `mydatabase`$$ DROP FUNCTION IF EXISTS `SPLIT_STR`$$ CREATE definer=`thisus...@`%` FUNCTION `SPLIT_STR`( X VARCHAR(255), delim VARCHAR(12), pos INT ) RETURNS VARCHAR(255) CH

one-liner perfectionist function question

2007-11-07 Thread Andrey Dmitriev
DROP FUNCTION IF EXISTS secs_to_hrs; DELIMITER | create function secs_to_hrs (secs varchar(10)) returns varchar(13) DETERMINISTIC BEGIN return CONCAT_WS(' h ',lpad(secs/60 div 60,3,' ') , CONCAT(lpad(round(secs/60 mod 60),2,' '),' mins') ); END; | DELIMITER ; What if I wanted to not display mi

Re: date function question

2007-06-12 Thread Baron Schwartz
There is also a LAST_DAY() function that returns the last day of the month: http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html Peter Brawley wrote: > # of days since the first of the month from last month datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01'

Re: date function question

2007-06-12 Thread Peter Brawley
> # of days since the first of the month from last month datediff(now(),date(concat(period_add(date_format(now(),'%Y%m'),-1),'01'))) > the # of days since the end of last month (e.g. from 5/31/07) datediff(now(),date_sub(concat(date_format(now(),'%Y-%m-'),'01'),INTERVAL 1 DAY)) PB - Andr

date function question

2007-06-12 Thread Andrey Dmitriev
Can someone advise the best way to determine a) the # of days since the first of the month from last month (e.g. from 5/1/07) b) the # of days since the end of last month (e.g. from 5/31/07) Is there are a good way to determine the # of workdays in a month. Thanks, Andrey -- MySQL General Mai

Re: function question

2003-06-22 Thread Paul DuBois
At 18:23 +0200 6/22/03, Anthony W. wrote: Hi, I'm just wondering is there a function instead of update to overwrite data that has expired?? Or can mysql automatically deletes records or rows that has expires just like cookies delete themselves after expiring. Cookies don't "delete themselves" afte

function question

2003-06-22 Thread Anthony W.
Hi, I'm just wondering is there a function instead of update to overwrite data that has expired?? Or can mysql automatically deletes records or rows that has expires just like cookies delete themselves after expiring. Thanx for the info Anthony -- MySQL General Mailing List For list archives

Re: DATE function question

2003-03-26 Thread Serge Paquin
;s how it's listed in the manual. > > date_add([thedatefield],Interval 15 day) > > Mark > > -Original Message- > From: Serge Paquin [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 26, 2003 10:35 AM > To: [EMAIL PROTECTED] > Subject: Re: DATE function questio

RE: DATE function question

2003-03-26 Thread Mark Armendariz
5 AM To: [EMAIL PROTECTED] Subject: Re: DATE function question I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost sure I got the syntax right off the top of my head. Check mysql.com for "date functions" if the above doesn't work. Serge. On

Re: DATE function question

2003-03-26 Thread Serge Paquin
I believe the following will work: date_add([thedatefield],Interval 15 days) I am almost sure I got the syntax right off the top of my head. Check mysql.com for "date functions" if the above doesn't work. Serge. On Wed, 26 Mar 2003 10:16:18 -0500 "Tom Ray" <[EMAIL PROTECTED]> wrote: > I hav

DATE function question

2003-03-26 Thread Tom Ray
I have a small question about the DATE function. This is what I want to do: - User enters information into form and submits it to database - When info is added to database the current date is stored ala 2003-03-26 - Now I want to take that date 2003-03-26 and tack on either 15 or 30 days on to it

RE: Sum function question

2002-02-27 Thread Roger Karnouk
ld1) as 'field-1' from tmp group by keyf; -Original Message- From: Javier [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 27, 2002 8:11 AM To: [EMAIL PROTECTED] Subject: Sum function question Hi, I have a table like this Key Field-1 A string1 A

Re: Sum function question

2002-02-27 Thread DL Neil
Hi Javier, > Hi, I have a table like this > >Key Field-1 >A string1 >A string2 >A string3 >B string1 >B string 2 > > I want to create a query to get the following result (only one line by key > field): > >A - string1,string2,string3

Sum function question

2002-02-27 Thread Javier
Hi, I have a table like this Key Field-1 A string1 A string2 A string3 B string1 B string 2 I want to create a query to get the following result (only one line by key field): A - string1,string2,string3 B - string1,string2 I try to u

Sum function question

2002-02-20 Thread Javier
- Original Message - From: Javier <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 20, 2002 2:47 PM Subject: Sum function question > Hi, i have a table like this > > Key Field-1 > A string1 > A string2 > A

Sum function question

2002-02-20 Thread Javier
Hi, i have a table like this Key Field-1 A string1 A string2 A string3 B string1 B string 2 I want to create a query to get the following result (only one line by key field): A - string1,string2,string3 B - string1,string2 I try to use the Sum function but it