Debbie
Set your variable as such
vjrndate = (max(jrndate)) from AHISTORY where policy = policy
If jrndate could possibly be null then use
vjrndate = (max(jrndate)) from AHISTORY where policy = policy AND
jrndate IS NOT NULL
Buddy
-----Original Message-----
From: Schooley, Debbie [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 12:38 PM
To: [EMAIL PROTECTED]
Subject: Max Value for a Variable
I am trying to get the maximum value for a variable that is being listed on
a report. The variable is not a column in the driving table it is a column
from another table. When I define the variable as:
vjrndate = max jrndate from AHISTORY where policy = policy
the response that I am getting is 12/31/4000 in all cases
When I try the same request from an r> prompt, I receive the correct
response - the maximum value for that column for that policy
r> select max jrndate from AHISTORY where policy = policy
Is there any way that I can get the maximum value to show up in the report
for a column which is not actually on the table that the report is driven
from?