>>>>>This code exemplifies what I want to do:
>>>>>
>>>>>
create table test (c1 c(254))
>>>>>insert into test (c1) values (replicate('X', 254))
>>>>>
>>>>>select (testa.c1 + testb.c1) as MemoCol from test testa, test testb
>>>>>
>>>>>How can I make the column named MemoCol a memo field?
>>>>
>>>>create table test (c1 c(254))
>>>>insert into test (c1) values (replicate('X', 254))
>>>>create cursor tmp (dummy M)
>>>>insert into tmp values("")
>>>>select dummy+c1 as memocol from test,tmp
>>>
>>>I tried that, it only seems to work with expressions of 2 terms. The following does not work:
>>>
>>>
>>>create table test1 (c1 c(254))
>>>create table test2 (c1 c(254))
>>>insert into test1 (c1) values (replicate('X', 254))
>>>insert into test2 (c1) values (replicate('X', 254))
>>>create cursor tmp (dummy M)
>>>insert into tmp values("")
>>>select dummy+test1.c1+test1.c1 as memocol from test1,test2,tmp
>>>
>>
>>I would look at this problem from another angle: where the result of this query should go? Is it report, grid or data import process?
>
>It populates a java jbcl cursor that uses the jdbc-odbc bridge to access the table. It must be a single select for this application.
It seems to me, that following idea should work:
use table1
create cursor tmp (dummy M)
insert into tmp values(" ")
select cnt,id,getmemocol(id) from table1 into cursor tmp1
return
function getmemocol && you can make it for more complicated algorithm
lParameter cId
select tmp
replace dummy with cId
return tmp.dummy
endfunc
Edward Pikman
Independent Consultant