[485] in Tooltime

home help back first fref pref prev next nref lref last post

Find Open

daemon@ATHENA.MIT.EDU (Debi Fuchs)
Fri Nov 7 10:54:09 1997

Date: Fri, 7 Nov 1997 10:53:59 -0500
To: tooltime@MIT.EDU
From: Debi Fuchs <debi@MIT.EDU>

Peter and David?

Sorry if I missed an update. What happened with the 255 character limit on
the WHERE clause of "Find Open"?  I was able to write it a little more
elegantly, but not get it below the limit initually.  However, since Steve
will be writing a kron job to reopen (or close) frozen logs on a daily
basis, we could drop a clause and rewrite the statement as follows to get
the WHERE clause below the limit:

   SELECT l.mit_log_id "Log", l.mit_status "Status",
             l.mit_category "Category", l.mit_pri_lastname "Last Name",
             l.mit_pri_firstname "First Name" ,
             substr(to_char(l.mit_created_ts,'YYYY/MM/DD HH24:MI:SS'),1,20)
             "Created On", substr(l.mit_summary,1,80) "Summary"
    FROM     mit_logs l, mit_lk_status s, profiles p
    WHERE    l.mit_status=s.mit_status AND l.mit_taken_by=p.userid(+)
             AND s.mit_status_flag=1
             AND l.mit_status NOT IN ('CLOSED','CANCEL')
             AND (l.mit_status<>'TAKEN' OR
                   upper(p.login_name)=(SELECT USER from dual))
    ORDER BY  s.mit_weight desc, l.mit_modified_ts, l.mit_log_id asc

Cheers,
-Debi


-------------
Debi Fuchs, Consultant
MIT Information Systems
Computing Help Desk Group
77 Massachusetts Avenue, 11-319
Cambridge, MA  02139
(617) 253-7812
debi@mit.edu



home help back first fref pref prev next nref lref last post