ADSM-L

Re: sql select from "yesterday"

2000-08-16 09:38:30
Subject: Re: sql select from "yesterday"
From: Alexander Z Sokolek Jr <asokolek AT KEYSPANENERGY DOT COM>
Date: Wed, 16 Aug 2000 09:38:20 -0400
Answering from the (Oracle) SQL standpoint, not necessarily from the
ADSM standpoint...

A Date object usually contains a date and a time.  If you want something
specific to a date, you need to remove the time component.  If I want
rows from yesterday or before, for instance, I could "select ... where
date_field < trunc(sysdate)" as one example.  If I only want yesterday,
then I could say "select ... where trunc(date_field) = trunc(sysdate) -
1".

Someone else will need to respond with the ADSM relative issues.

Alex Sokolek

Winfried Heilmann wrote:
>
> Hi,
>
> for reporting I work with sql select.
>
> Can anybody tell me, how I can do a select from a table (for example
> actlog) only with the record from yesterday or the day before yesterday?
>
> I can select the records from today with
>
> select  ..................................where date(date_time)=current
> date .
>
> regards winfried
<Prev in Thread] Current Thread [Next in Thread>