Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp6 vs vfp9 null in SQL SELECT
Message
 
 
To
23/09/2008 09:49:31
Howard Brown
Howard J. Brown Consulting Services Inc.
North Kingstown, Rhode Island, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 2000 SP4
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01349825
Message ID:
01349828
Views:
20
>With settings ENGINEBEHAVIOR =70, vfp6 version sp5, vfp9 version sp2
>joining 2 files
>BACKOUTS
>NOREPORT, where this file contains null values in field encounter_transaction_number_tx in certain rows
>
>This code returns 10 records when run in vfp6 and 0 records when run in vfp9
>select backouts.encounter_tracking_number_tx from backouts where backouts.encounter_tracking_number_tx;
>not in (select noreport.encounter_tracking_number_tx from noreport) into cursor report;
>group by backouts.encounter_tracking_number_tx
>
>This code returns 10 records in BOTH vfp6 and vfp9
>select backouts.encounter_tracking_number_tx from backouts where (backouts.encounter_tracking_number_tx;
>not in (select noreport.encounter_tracking_number_tx from noreport WHERE NOT ISNULL(noreport.encounter_tracking_number_tx))) into cursor report;
>group by backouts.encounter_tracking_number_tx
>
>Is there a configuration option for vfp9 that will make it unnecessary to find and modify my old SQL statements for this condition?
>
>TIA
>Howie

I'm not sure about the setting, but this select is much better optimizable (performs faster) when it's written this way
select encounter_tracking_number_tx from backouts RE ;
LEFT JOIN  noreport NO On RE.encounter_tracking_number_tx = NO.encounter_tracking_number_tx ;
and NO.encounter_tracking_number_tx IS NULL  into cursor report;
group by RE.encounter_tracking_number_tx
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform