Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Improving sluggish SQL
Message
From
20/12/1999 13:27:21
Walter Meester
HoogkarspelNetherlands
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00306158
Message ID:
00306289
Views:
40
Ed,

>>>I have some very large tables from which I have to get records NOT IN other very large tables. Code like this:
>>
>>>select * from table1;
>>>where keyfield NOT IN;
>>>(select keyfield from table2)
>>
>>how about
>>
>>USE TABLE1
>>USE TABLE2 ORDER TAG keyfieldTag
>
>This needs an IN 0 clause at a minimum.

YEP, I forgot.

Geez, if you're gonna post bad xBASE, at least make the bad xBASE code workable and correct. As posted, only TABLE2 is open - you've gone and USEd it in the same workarea as TABLE1. The joys of xBASEism...

Ed, is it truly you or are you JohnP taking over your account. It seems you both get some of the same habbits. Integrity is falling down...

>>SET RELATION TO Keyfield INTO Table2

>In order to activate the relation, you need to shift the record pointer (even if back to itself) so adding a GO TOP or LOCATE here might be appropriate.

If you'd know better and have used it, you would know that this ISN'T neccesary when issueing one of the following commands.

>>BROWSE NORMAL FOR EOF("Table2")

>I seriously doubt that Bruce wants to cruise the file in a Browse, but YMMV.

>>You might want to copy this into a temp table

>>COPY TO Temptable EOF("Table2")

>Your coding is extremely consistent. You need a FOR just prior to the conditional expression.

Yep I forgot the FOR also, but I doubt that Bruce wouldn't have found out himself. I'm merely giving him a hand in a situation where SQL is letting him down.

If you're not able to act as a adult and grow up then please don't reply my messages in this doubtfull childish way. As i said before to someone your behaviour doesn't fit your MVP status. We've got enough of the belittleling and insulting people over the last couple of months, but if you isist go ahead and show the whole world where mister Ed Rauh stands for....

I'm really pissed off now..

I'll not respond to you messages anymore...

Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform