Hiya,

Why would you want to?  Any time you need days elapsed, just compute it.
Never store summary data without a good reason. (making things go faster is
a good reason)  :)

select (orderdate-shipdate) as dayselapsed from ...

should work.

=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-----Original Message-----
From: MissKitty [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 13, 2002 11:00 AM
To: [EMAIL PROTECTED]
Subject: help-newbie


I need help, I am new to mysql and am trying to work with a table.  I
already have some fields called order number, orderdate, and shipdate.  I am
trying to create a new field called dayselapsed and have it subtract the
order date from the ship date.  It would need to look like this:
Ordernumber        Orderdate        Shipdate        DaysElapsed
1                            1999-07-01       1999-07-03   2
2                            1999-07-01       1999-07-04    3

I have no idea how to do this.  Could someone include the exact commands, as
I am lost?
Thanks!
Rachel


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to