Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor
Message
 
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:
01591794
Vues:
50
What is your desired text format?

Once you have your emails in the cursor you can use COPY TO command to create the text file. In this text file each email will be on its own line. If this is not what you want, you may build the text file by other means (for instance, scan the cursor and output into file using fput() function)


>fantastic Naomi !! - that is even better than I was hoping for - saves a lot of data search I was preparing myself for.
>Is there a direct way to convert this to text using filetostr() method or do I go cursortoxml() (which for me i think would be a two step process)
>
>k
>
>>>I want to create a text file that displays all email lists from 4 different dbf files. there are many duplications so I wanted to eliminate email duplicates from the other database files. I thought perhaps creating a cursor would be the way to go.
>>>I have not used cursor in my programming and would like to give it a try if you thought it might be the way to go here. This attempt failed, Can someone please assist and send me on my way to part two. thanks so much
>>>k
>>>
>>>CREATE CURSOR email ;
>>> (email c(40))
>>> 
>>>Use mydbf1
>>>go top
>>>do while not eof()
>>>m_email=rtrim(email)+';'
>>>INSERT INTO email;
>>>   VALUES m_email
>>> skip
>>> loop
>>> enddo
>>>BROWSE
>>>
>>
>>So, try
>>
>>CREATE CURSOR email (email C(40))
>>INSERT INTO Email (Email)
>>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.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform