Now this sounds like the sort of thing I used to want to do and everybody
would ask me why on Earth I wanted to do that!
Best answer: because R:Base can and somebody else wants to know.
My first thought was to create a temp table in the loop and populate it with
each individual word, autonumber it or use the ItemCnt value then you can
search the temp table and extract the words and number that you're looking
for. Your word count will be the number of rows.
Then I thought about half a million rows to go through. I know that R:Base
is fast and temp tables are fast but even so... I guess a lot depends on how
long each row of text is?
Just one word (no pun intended) of warning: watch out for apostrophes - you
might need to work around them.
Good luck - somebody will almost certainly give you a better solution,
Regards,
Alastair.
----- Original Message -----
From: "Paul Buckley" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Thursday, January 15, 2009 3:54 PM
Subject: [RBASE-L] - Looking for Some Input for Text String Manipulation
Good Morning All,
I'm wondering if anyone else has done this and is willing to share. I'm
working on a project using V8 Turbo. I'm going to be counting the number
of
words in a description text string for over 500,000 rows of data and I
need
to know the relative "word" position of words in the string. For example;
if the string is 'This is a test string to demonstrate what I need to
do.',
it has 12 words and the word 'string' is the 5th word and the word
'demonstrate' is the 7th word.
I know I can use the ItemCnt function to count the number of words, by
first
changing the delimiter to a space. I'm looking for a slick way to find a
words relative position by word count.
If anyone has any suggestions or insight I would greatly appreciate it.
Thanks in advance,
Paul Buckley
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.7/1895 - Release Date: 15/01/2009
07:46