Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Nested Selects
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00274983
Message ID:
00274999
Vues:
32
>>I could have sworn I did this before. I must have my syntax wrong:
>>
>>SELECT * FROM Depts WHERE Div_Code IN (SELECT DISTINCT Div_Code FROM NewDivs) INTO CURSOR NewDepts
>>
>>TIA
>
>The code works fine for me. What is happening?

VFP is complaining that I need to create NEWDIVS with SELECT...TO TABLE, whereas I am using SELECT...TO CURSOR.

Oooohhh! I think I see what's happening! I created NewDivs with a SELECT statement (SELECT * FROM Divs WHERE Proj_No = "20524.00" INTO CURSOR NewDivs) - but instead of creating a new table, VFP did a USE AGAIN on the original table with a filter (baaad fox)! I'll need to alter my first select statement in such a way to prevent VFP from doing that.

I seem to remember an article about this many, many moons ago.

I'd like to do it without altering the structure of the cursor, since I'm ultimately gonna APPEND FROM it. Any suggestions?
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform