Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro can't query on two tables more than 7m
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01219859
Message ID:
01220176
Views:
28
This message has been marked as a message which has helped to the initial question of the thread.
The check for NULL has to be in the WHERE clause
Select PrevYear.* ;
	from PrevYear ;
	left outer join thisyear ;
		on PrevYear.mijbrpls = thisyear.mijbrpls ;
			and PrevYear.vlgnr_mut = thisyear.vlgnr_mut ;
	WHERE thisyear.vlgnr_mut IS NULL
>
>As promised here are my datasamples and the result of your suggested query:
>PrevYear:
>
>mijbrpls	vlgnrbsvz	vlgnrplsvr	vlgnr_mut	bdr_srt
>21102187646	1	        11	        419	        VSCPRM
>21102187646	1	        11	        420	        AKPKST
>21102187646	1	        11	        420	        APRV
>21102187646	1	        11	        420	        BNSPRV
>21102187646	1	        11	        420	        INCKST
>21102187646	1	        11	        420	        INCPRV
>21102187646	1	        11	        420	        PLSOP
>21102187646	1	        11	        420	        1STKST
>21102187646	1	        11	        421	        BHRKST
>21102187646	1	        11	        422	        RISPRM
>
>
>ThisYear:
>
>mijbrpls	vlgnrbsvz	vlgnrplsvr	vlgnr_mut	bdr_srt
>21102187646	1	        11	        419	       VSCPRM
>21102187646	1	        11	        421	       BHRKST
>21102187646	1	        11	        422	       RISPRM
>
>
>I am doing the suggested query:
>
>Select PrevYear.*;
>	from PrevYear;
>	left outer join thisyear;
>		on PrevYear.mijbrpls = thisyear.mijbrpls ;
>			and PrevYear.vlgnr_mut = thisyear.vlgnr_mut;
>			AND thisyear.vlgnr_mut IS NULL
>
>
>Result of the query:
>
>mijbrpls	vlgnrbsvz	vlgnrplsvr	vlgnr_mut	bdr_srt
>21102187646	1	        11	        419	        VSCPRM
>21102187646	1	        11	        420	        AKPKST
>21102187646	1	        11	        420	        APRV
>21102187646	1	        11	        420 	        BNSPRV
>21102187646	1	        11	        420	        INCKST
>21102187646	1	        11	        420	        INCPRV
>21102187646	1	        11	        420	        PLSOP
>21102187646	1	        11	        420	        1STKST
>21102187646	1	        11	        421	        BHRKST
>21102187646	1	        11	        422	        RISPRM
>
>
>As you see there is no difference between the result and previous year. While I expected that the result would return the records where vlgnr_mut =420
>I hope this clarify things....
>
>Thanks beforehand.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform