ADSM-L

Re: sql select from "yesterday"

2000-08-16 09:32:32
Subject: Re: sql select from "yesterday"
From: "Williams, Tim" <Tim.Williams AT FRITOLAY DOT COM>
Date: Wed, 16 Aug 2000 08:31:50 -0500
        Here's an example for you....FYI Thanks Tim
        adsm> select date_time, message from actlog where (msgno=8337 or
msgno=8468) and
         days(current_date)-days(date_time)=1  ----you can vary the =1 to be
<2 to check the last 2 days
        and another
        adsm> select node_name, contact, lastacc_time, reg_time, domain_name
from nodes
        where domain_name='FL_INTL' and
days(current_timestamp)-days(lastacc_time)>60 or
        der by lastacc_time desc > d:\personal\adsmreports\intlcleanup




        Winfried Heilmann <winfried.heilmann AT INFRACOR DOT DE>
        08/16/2000 09:16 AM
        To:     ADSM-L AT VM.MARIST DOT EDU@SMTP@Exchange
        cc:

        Subject:        sql select from "yesterday"

        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>