Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select with Subquery confusion
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00053103
Message ID:
00053162
Views:
28
>>>>Roxy,
>>>>
>>>>I think you need to add aliases to that second query and add a condition, like this:
>>>>
>>>>
>>>>SELECT * FROM ALPHA_X A WHERE NOT EXISTS( ;
>>>> SELECT * FROM ALPHA_X B WHERE A.Somefield = B.Somefield AND B.stype="WL " AND B.progtype="NP") ;
>>>> INTO CURSOR ALPHATMP
>>>>
>>>>I think that ought to do it.
>>>>
>>>I tried playing around with something similar to that, will try again if I get the chance. For now I just changed code to reflect Fast Eddies response.
>>>
>>
>>The actual query I used to test this went something like:
>>
>>SELECT * FROM Stds A WHERE EXISTS;
>>(SELECT * FROM Stds B WHERE A.Style = B.Style AND BETWEEN(B.Style, '50000', '60000'));
>>INTO CURSOR Foo
>>
>>There were 4 records in the Stds table that fell between those two numbers and that's how many the query returned. That A/B comparison stuff may be overkill.
>>
>>>>How come no new picture of you from DevCon (with hat, of course)?
>>>>
>>>Actually, I did have one taken when I was stuck at Chicago airport with me wearing my hat backwards and working on DevCon article. But I didnt put it up on the webpage with my other pics because I look really hungover, and I didnt want boss to question the fact I missed my plane out of SD. :D)
>>
>>O'Hare or Midway. O'Hare I hope. Being stuck at Midway wouldn't be fun. I'm originally from there.
>>
>>Will you post or send me the address of your page so I can take a look. I've been so busy that I forgot to drop on by.
>>
>>George
>
>It was O'Hare thankfully. My DevCon pics are at http://members.aol.com/roxannetsr/roxdev.htm

Thanks. Look's like you guys had a great time there (especially the 2AM shot). Well, I hope I'll get to join you folks in Orlando. There's a chance since my mother-in-law lives in the suburbs (so I don't have to get a hotel room as well). I might be able to get the company to pop for DevCon, but the travel and lodging might be a little too rich for their blood. Gotta remember to bring my cue;-).

Well, it's Friday and 4:30 and I'm about to knock off (which means it's beer time) %-).

George
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform