Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: designing inventory project in Oracle

Re: designing inventory project in Oracle

From: <finleyd_at_vrinet.com>
Date: Tue, 09 Feb 1999 13:29:34 GMT
Message-ID: <79pd7l$3j7$1@nnrp1.dejanews.com>


In article <19990208030004.02891.00001473_at_ng124.aol.com>,   profwdesk1_at_aol.com (ProfWdesk1) wrote:
> I'm doing a class project, designing a way to keep inventory.
> Here's a simple question. What command would a use to
> have Oracle look for the last time inventory was taken?...
> any other ideas would be appreciate..I'm new to this group
> and Oracle. Roy ProfWdesk1_at_aol.com
>

Roy and all,

This would depend on what you mean by "taking inventory". If you mean "When was the last inventory entry transaction?" (i.e., last record created), then a solution would be of the form:

 Create a time-stamped "record_created" field of DATE datatype. When a new record is created, this field would get the current time, using the "SYSDATE" function.

To then get the last time (i.e., most recent time), you could just use a select of the form:

 SELECT MAX(record_created) from inventory_transaction;

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Feb 09 1999 - 07:29:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US