Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SubQuery Problem
Message
From
14/10/2006 01:21:39
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SubQuery Problem
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01161962
Message ID:
01161962
Views:
57
Dear all,

I would like to
(1) select patients who visit on specific date
(2) and to see where those patients have booked next appointment

I would like to do it via SQL query (like sqlexec(gnconn,"select ... ") like that:-
SELECT case_no, appt_time FROM appt_table a where a.case_no in (select b.case_no from pt_tx2 b where tx_date = '2006-10-06') 
But the query tooks 33 sec to complete?! what's wrong?

Also, this statement only to query for appointment that may be in the past, or far further, and it is not necessary to be next immediately appointment

Please help

Thanks in advance!
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform