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:
01219871
Views:
10
If you want to find records which are in the previous year and not in this year, then start from the previous year.

E.g.
select PrevYear.* from PrevYear py left join CurrentYear cy on py.Fk = cy.Fk where cy.pk IS NULL
BTW, may be you just need PK of the deleted records to get smaller set?

>Hi all,
>
>I'm having a big problem with a query which doesn't work (the query doesn't finish and computer goes on tilt). I have two tables who are almost identical only that one table is of the previous year and the other of this year. Every year the number of records get bigger but it also happens that there are records that have been deleted in the new download. I want to know the deleted records from the old table by comparing both tables with a query. Both that tables are more than 7 million records (I say this because I think that foxpro can't handle this, is this true?). The query is very simple:
>
>
>Select mutbdrg.*, b.mijbrpls as recdeleted from mutbdrg;
>left outer join b;
>on b.mijbrpls = mutbdrg.mijbrpls and b.vlgnr_mut = mutbdrg.vlgnr_mut
>
>
>
>Mutbdrg is of this year and b of previous year. So the goal is to have the deleted records. But this query doesn't get finished....
>
>I'm having the following datasample:
>
previous year
>
>mijbrpls	vlgnrbsvz	vlgnrplsvr	vlgnr_mut	bdr_srt
>21103076903	1	2	29	VSCPRM
>21103076903	1	2	30	AKPKST
>21103076903	1	2	30	APRV
>21103076903	1	2	30	BNSPRV
>21103076903	1	2	30	INCKST
>21103076903	1	2	30	INCPRV
>21103076903	1	2	30	ISOP
>21103076903	1	2	30	PLSOP
>21103076903	1	2	30	1STKST
>21103076903	1	2	31	BHRKST
>21103076903	1	2	32	RISPRM
>21103076903	1	2	33	VSCPRM
>21103076903	1	2	34	AKPKST
>21103076903	1	2	34	APRV
>21103076903	1	2	34	BNSPRV
>21103076903	1	2	34	INCKST
>21103076903	1	2	34	INCPRV
>21103076903	1	2	34	ISOP
>21103076903	1	2	34	PLSOP
>21103076903	1	2	34	1STKST
>21103076903	1	2	35	BHRKST
>21103076903	1	2	36	RISPRM
>21103076903	1	2	37	VSCPRM
>21103076903	1	2	38	AKPKST
>21103076903	1	2	38	APRV
>
>
this year
>
>mijbrpls	vlgnrbsvz	vlgnrplsvr	vlgnr_mut	bdr_srt
>21103076903	1	2	29	VSCPRM
>21103076903	1	2	30	AKPKST
>21103076903	1	2	30	APRV
>21103076903	1	2	30	BNSPRV
>21103076903	1	2	30	INCKST
>21103076903	1	2	30	INCPRV
>21103076903	1	2	30	ISOP
>21103076903	1	2	30	PLSOP
>21103076903	1	2	30	1STKST
>21103076903	1	2	31	BHRKST
>21103076903	1	2	32	RISPRM
>21103076903	1	2	35	BHRKST
>21103076903	1	2	36	RISPRM
>21103076903	1	2	37	VSCPRM
>21103076903	1	2	38	AKPKST
>21103076903	1	2	38	APRV
>21103076903	1	2	38	BNSPRV
>21103076903	1	2	38	INCKST
>21103076903	1	2	38	INCPRV
>21103076903	1	2	38	ISOP
>21103076903	1	2	38	PLSOP
>21103076903	1	2	38	1STKST
>
>As you can see the set of records where vlgn_mut = 34 has been deleted. This set of records I want have.
>
>How could i do this?
>
>Thanks beforehand
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform