[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Finding minumums



Hello,

I am new to the SQR arena and I am pretty lost.  I can do your basic selects and
data manipulation, but I've just been assigned to a report modification that may
be a little out of my league, so any and all help would be extremely
appreciated.  The client I'm working for has captured time data from one system
and interfaced it into a 'comments' field in a PeopleSoft table.  A typical row
looks something like this:  800-1500--TRC: REG--HRS: 7 (start time, end time,
time reporting code, number of hours).  What I need to do is capture the start
and end times and print them on the report. I have almost successfully done this
using substrings (it gets tricky because some start times are 3 digits, some 4).
The problem is, sometimes an employee has multiple rows, one containing the
actual start time (the minimum of all of the start times) and another containing
the actual end time (the maximum of all of the end times).  Is there a way I can
evaluate the substring variable and only select and print the one I need?  I
assume there is, but it definitely wasn't covered in my SQR class!

I hope my explanation was clear.  Please offer any help you can!  Thanks.

Deb