MikeCopeland
Programmer
Using CR 11...
How do I apply a Max clause to the Record Selection statement? I have the following "select" clause:
//----------------------------------------------------------
if (({Clients.ClientLastName} <> "TEST")
and ({@inRange}) and ({ClientPacket.PacketKey} = 42)
and (isNull({ClientISP.HistoryChangeDate}))
and (isNull({FCDischargeSummaryReport.HistoryChangeDate}))
and ({@isTherapist}) ) then true
else false
//---------------------------------------------------------- This produces multiple output Detail records because there are multiple instances of records in one of the linked tables, and I want only the _maximum_ record from that table to be considered/used. I have analyzed the database extensively, and there is no unique link
to that table - but I can safely use the highest ID from that table.
I'm actually trying to emulate a "select Max(ID) from ClientStatus" (this table isn't mentioned in the above Record Selection clause), but I don't know how to do so...
Please advise. TIA
How do I apply a Max clause to the Record Selection statement? I have the following "select" clause:
//----------------------------------------------------------
if (({Clients.ClientLastName} <> "TEST")
and ({@inRange}) and ({ClientPacket.PacketKey} = 42)
and (isNull({ClientISP.HistoryChangeDate}))
and (isNull({FCDischargeSummaryReport.HistoryChangeDate}))
and ({@isTherapist}) ) then true
else false
//---------------------------------------------------------- This produces multiple output Detail records because there are multiple instances of records in one of the linked tables, and I want only the _maximum_ record from that table to be considered/used. I have analyzed the database extensively, and there is no unique link
to that table - but I can safely use the highest ID from that table.
I'm actually trying to emulate a "select Max(ID) from ClientStatus" (this table isn't mentioned in the above Record Selection clause), but I don't know how to do so...
Please advise. TIA