Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Text to table
Message
 
 
To
16/05/2007 09:05:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01225935
Message ID:
01225939
Views:
25
>Hi all,
>I need to sort out the words in a text file and put them into a table.
>Do you have any solution for it?
>like this:
>
>sample text
>
>I need to sort out the words in a text file and put them into a table.
>Does anybody have a solution or a link for it?
>
>
>table1
>
>field1 | field2
>I      |   1
>need   |   1
>to     |   1
>sort   |   1
>out    |   1
>the    |   1
>words  |   1
>...
>
>
>

The simplest way would be to put them into array using ALINES and then append from array.

In other words:
lcString = filetostr('MyFile.txt')
alines(laWords, lcString,.t.," ")

create table Words (word C(100))
append from array laWords
From the top of my head and not tested.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform