Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Complicated Select
Message
From
20/10/2005 12:04:30
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01060659
Message ID:
01060761
Views:
9
>>Do select on FORCED and if it returns 0 record, run your regular select.
>>
>
>Is there a way to do this logic in one select?

try ( not verified )
SELECT
NVL(X.FIELD1,Y.FIELD1) FIELD1
....
FROM  TABLE1 X FULL JOIN TABLE1 Y ON ISNULL(X.PK)
 WHERE X.FORCEDCONDITION AND Y.REGULARCONDITION
Of course, it is not efficient with a lot of rows
Previous
Reply
Map
View

Click here to load this message in the networking platform