Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use subquery
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01514285
Message ID:
01514391
Views:
45
>>>>>Don't get it.
>>>>>Some example data and desired result?
>>>>
>>>>Here a sample code I am playing with:
>>>>
>>>>CREATE CURSOR Table1 (pk_fld i, task_no i)
>>>>INSERT INTO table1 VALUES (1,1)
>>>>INSERT INTO table1 VALUES (1,2)
>>>>CREATE CURSOR Table2 (task_no i, flda c(1), fldb c(1))
>>>>INSERT INTO table2 VALUES (1,"A","B")
>>>>INSERT INTO table2 VALUES (2,"C","D")
>>>>INSERT INTO table2 VALUES (3,"C","F")
>>>>INSERT INTO table2 VALUES (4,"K","I")
>>>>
>>>>
>>>>Keep in mind that the above case has more records in Table2 than in Table 1 and for this FULL JOIN seem to work. But I need to test it in the case when Table1 has more records than Table2.
>>>

I have been playing with my real data and the problem I get with FULL JOIN (not always but sometimes) that the resulting query has huge number of records. For example, I have one case where Table1 has 444 records, table2 has 444 records but the resulting query has 194484 records. And this is what I need to find out how to resolve.

Update. I now understand why I am getting this high number of records. It happens when Table2 has more than one record for the same task number. So I suppose I will have to make sure it does not happen.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform