If memfield length is 254 or less
Select codedesc as Name, PADR(memofield,254) as Alias
from codetable c
where c.coddtype = "somegroup"
>
>I'm working on an application that has a lot of data in Memo fields, and I'm trying to speed up an Import program. The case in point is:
>
>Decode Table with
>
>Codetype Codedesc Memofield
>somegroup insurance name Alias' of insurance name
>
>
>Currently the code is creating a cursor (Name c(30), Alias c(30)) and using a "do while" loop is calling a UDF to pull the data from the memofield and then push the data into the cursor fields.
>
>What I'm hoping I can come up with is something like
>
>Select codedesc as Name, memofield as Alias
> from codetable c
>where c.coddtype = "somegroup"
>
>and have 'Alias' be a character field, not a memo field
>
>
>>>I'm really, REALLY hoping that VFP has come up with a way to get data out of memo fields within an SQL statement. I'm really, REALLY thinking I'm going to be disappointed, but y'all have surprised me before.
>>
>>What exactly is your problem with memo fields?
--sb--