Hi and thanks in advance for the help...

When doing an SQL query I've often used things like...

space(2) as State

or

000000.00 as Amount


is there a construct that I can use in a query to create a memo field in the
resulting table?


Thanks,
Jeff

Re: empty memo field in an sql query by Gianni

Gianni
Thu Jul 03 13:59:55 CDT 2008

On Thu, 3 Jul 2008 14:49:17 -0400, "Jeff Grippe" <jeff@door7.com> wrote:

>Hi and thanks in advance for the help...
>
>When doing an SQL query I've often used things like...
>
>space(2) as State
>
>or
>
>000000.00 as Amount
>
>
>is there a construct that I can use in a query to create a memo field in the
>resulting table?

If you are using VFP9 you can use CAST:

select *, cast("" as Memo) as MyMemo ;
from MyTable ;
into cursor MyQuery

otherwise:

create cursor TMP_AUX01 (MyMemo M)
append blank

select * ;
from MyTable, TMP_AUX01 ;
into cursor MyQuery

USE in TMP_AUX01

--
Gianni

Re: empty memo field in an sql query by Jack

Jack
Thu Jul 03 14:03:57 CDT 2008

On Thu, 3 Jul 2008 14:49:17 -0400, "Jeff Grippe" <jeff@door7.com>
wrote:

>Hi and thanks in advance for the help...
>
>When doing an SQL query I've often used things like...
>
>space(2) as State
>
>or
>
>000000.00 as Amount
>
>
>is there a construct that I can use in a query to create a memo field in the
>resulting table?
>
>
>Thanks,
>Jeff
>

While I have not tried it, if you are using a VFP version that
supports CAST() I would think you could use that.


Re: empty memo field in an sql query by Dan

Dan
Thu Jul 03 14:03:15 CDT 2008

In VFP9: Select Cast((field(n)) As Memo)

In prior versions, create a cursor with a memo field and include that memo
field in your output list.

Dan

Jeff Grippe wrote:
> Hi and thanks in advance for the help...
>
> When doing an SQL query I've often used things like...
>
> space(2) as State
>
> or
>
> 000000.00 as Amount
>
>
> is there a construct that I can use in a query to create a memo field
> in the resulting table?
>
>
> Thanks,
> Jeff