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:
00053141
Views:
30
>>>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
Roxanne M. Seibert
Independent Consultant, VFP MCP

Code Monkey Like Fritos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform