Re: divid the memo field into several records by Josh
Josh
Wed Jul 04 07:56:15 CDT 2007
I still think getwordnum() would be better/cleaner -- but that's just me.
On Tue, 3 Jul 2007 23:41:06 +0200, "Anders Altberg" <anders.altberg> wrote:
>This is what I had in mind:
>
>CLEAR
>#DEFINE CRLF CHR(13)+CHR(10)
>TEXT TO x NOSHOW
> aa aa
>b bbb
>ccc c
>Dd d d, dd
>ENDTEXT
>nn=OCCURS(CRLF,x)
>? 1, STREXTRACT(x,'',CRLF, 1)
>FOR i = 1 TO nn
>? i+1, STREXTRACT(x,CRLF,CRLF, M.i)
>NEXT
>?? STREXTRACT(x,CRLF,'',nn)
>
>-Anders
>
>
>"Josh Assing" <XjoshX@jAssing.com> wrote in message
>news:ejmk83hs8omovts47qercv5ucninra8ds1@4ax.com...
>> Well; caveat on that...
>> memlines() uses the value of set memo.... so you need to be sure your
>> paragraphs
>> are correctly sized, line length wise....
>>
>> Also; this assumes that there's a leading and ending crlf pair.... no?
>>
>> On Tue, 3 Jul 2007 12:39:39 +0200, "Anders Altberg" <anders.altberg>
>> wrote:
>>
>>>
>>>Use STREXTRACT(cSearchExpression, cBeginDelim [, cEndDelim [, nOccurrence
>>>where cBeginDelim and cEndDelim is CHR(13)+CHR(10)
>>>to extract the first paragraph, then loop for the rest.
>>>
>>>FOR i = 1 TO MEMLINES (mymemo)
>>>lcParagraph=STREXTRACT(mymemo, chr(13)+chr(10) ,chr(13)+chr(10) , M.i
>>>INSERT ...
>>>NEXT
>>>
>>>-Anders
>>>
>>>"Patrick" <patrick.stat@gmail.com> wrote in message
>>>news:eHsI$5GvHHA.1340@TK2MSFTNGP02.phx.gbl...
>>>> Hi everybody,
>>>> Given a table contained a record:
>>>>
>>>> a b c
>>>> ================================
>>>> a1 xyz (memo)
>>>>
>>>> where (memo) is the memo field contained the following:
>>>> dvud shijdjd dhjsodjds dguhijhisa dghhdaijodk dhuadhijoaka sahiasijaso
>>>>
>>>> dhdsdsjidjldslkdpjdf dfhfdhfijodjfsfah sddhdijosdksad shidjokpdbjhd
>>>> dshisdjdhjijhfjsf sfuhshfd fghubjfd dghjuhsihjs shguhidn
>>>> dhshsdij dguhuhd dshiihijodsa dhushdsjodsk.
>>>>
>>>> dsahguhhdi dhijdi
>>>>
>>>> In this memo field, three paragraphs involved. My question is that is it
>>>> possible to diverse this record into three records by the paragraph,
>>>> that
>>>> means:
>>>>
>>>> a b c
>>>> ================================
>>>> a1 xyz 1st paragraph
>>>> a1 xyz 2nd paragraph
>>>> a1 xyz 3rd paragraph
>>>>
>>>> And the data type for c remained unchanged, i.e. memo field!!
>>>>
>>>> Thanks and regards,
>>>> Patrick the Statistics
>>>
>>
>