Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL question
Message
From
06/08/2009 10:09:11
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01416401
Message ID:
01416473
Views:
46
>>>Unfortunately, this would not give us only error cases - I just thought of the same SQL. You don't need to join here. This would give all C3 cases even when a/b combination is the same - I don't see a simple way to separate them - need to think.
>>
>>Yes, and start reading the question first
>
>I believe we wanted to get all records where we have discrepancy. BTW, I figured this out while driving.
>
>select T.* from myTable T INNER JOIN (select a,b,c from myTable group by c, a, b) X on T.c= X.c and (T.a<>X.a OR T.b <>X.b)
Same defect as message#1416403

try with this
	
		create cursor Schnaps ;
	(	c1	c(1), ;
		c2	c(1),; 
		c3	c(1) ;
	)
	
	insert into Schnaps values ('A', 'a', '1')
	insert into Schnaps values ('A', 'b', '2')
	insert into Schnaps values ('A', 'b', '3')
	insert into Schnaps values ('B', 'c', '4')
	insert into Schnaps values ('B', 'd', '4')
	insert into Schnaps values ('B', 'e', '4') && added
	insert into Schnaps values ('B', 'f', '4') && added
	insert into Schnaps values ('A', 'b', '3')
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform