Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor
Message
De
13/01/2014 22:44:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Cursor
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01591784
Message ID:
01591812
Vues:
54
>I am getting an error read on the second line - anyone know why? tnx k
>
>CREATE CURSOR email (email C(40))
>INSERT INTO Email (Email)     &&&  syntax error
>select email from myDbf1 ;
>UNION ;
>SELECT email from myDBF2;
>UNION ;
>SELECT email from myDBF3;
>UNION ;
>SELECT email from myDBF4
>
>>
>>UNION eliminates duplicates so the resulting cursor will have all unique emails from your 4 DBFs.

There are only supposed to be 2 commands in what you've shown; there should be a semicolon at the end of the 2nd line.

You don't have to create the cursor in advance - a SQL SELECT can do it for you:
SELECT email from myDBF1 ;
UNION ;
SELECT email from myDBF2 ;
UNION ;
SELECT email from myDBF3 ;
UNION ;
SELECT email from myDBF4 ;
INTO CURSOR Email
* if you need a read-write cursor you can add READWRITE to the very end of the above command
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform