Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select SQL - 2nd Table with multiple records
Message
From
03/10/1998 13:20:57
 
 
To
03/10/1998 11:28:39
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00143579
Message ID:
00143618
Views:
23
Hi Cetin/Erik

I tried the following:

select patient.sn, patient.fn, patient.dob, referrals.date ;
from inpatients!patient ;
left join inpatients!referrals ;
on patient.mno=referrals.mno ;
.and. referrals.date IN
(SELECT TOP 1 referrals.date;
from referrals;
where referrals.mno=patient.mno;
order by referrals.date desc);
into cursor bob

but get an error message 'Function Name is Missing)'

any ideas....and thanks for your help so far. Incidentally, the most recent is not necessarily the most recent by date as a user may retrospectively add a new record which was missed earlier on; I need the most recent by date

Regards,

Bob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform