Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subqueries in select list of FoxPro SQL
Message
 
 
To
03/10/2001 09:47:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00563561
Message ID:
00563571
Views:
15
>SQL Server likes this query, but FoxPro doesn't. Foxpro gives
>
>Function name is missing ).
>
>Anybody know how to reword it to work?
>
>select rtrim(clients.fname)+rtrim(' '+clients.mname)+' '+rtrim(clients.lname) as fullname, (select top 1 plans.effective from plans where plans.clientno=clients.clientno and plans.effective>date() order by plans.effective) as meetdate, (select top 1 plans.meet_time from plans where plans.clientno=clients.clientno and plans.effective>date() order by plans.effective) as meettime from clients into table formlet2 order by clients.lname, clients.fname, clients.mname, clients.clientno

Randy,
You may have to create two functions and pass in the client's clientno. The functions would return the Meetdate and Meettime respectively. It may take a while to process but that should get you what you want.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform