[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: Finding minumums
There are two simple solutions.
1. From the Main Employee Select call two procedures which returns min and
max time
like select subtr(to_char(min(time))) from ps_tablename where emplid =
&emplid and ...
2. Use an array and store all times for an employee and do a break on
emplid and do the arthmetics on the array and get the value you want and
print it.
Hope this helps
Regards
Vivek
At 11:17 AM 10/5/99 , you wrote:
>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
>