Database query and extraction
Sarah
sarahr at genesearch.com.au
Mon Mar 24 22:10:00 EST 2003
filter - it's like magic :-)
read your file into a variable, copy that to another variable because
the filter command is destructive and then use something like:
filter myData with "*string to find*"
After this the variable will only contain those lines with "string to
find" somewhere in the line. And it is REALLY fast.
Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/
On Tuesday, March 25, 2003, at 12:39 pm, ncouch wrote:
> I am building a test app with which I want to do the following:
>
> 1) open a file (a csv file)
> - the records of this database are separated currently by two CR's.
> 2) search through the file to find a string
> 3) extract each records which contains that string writing it to
> another
> file or field.
> 4) continue the search until eof.
>
> The "open file" and "read from" file commands are straightforward
> enough.
>
> I can find the data, but the extraction (ie everything between the
> CR"s -
> two in front of the record and the two after the record). Right now I
> end
> up extracting the whole database up to the point where it finds the
> string I
> am looking for. How can I extract just the entire record.
>
> Anyone have any ideas of what I can use?
>
>
> TIA
>
> Nate
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list