Hi

Is it possible to have a calculated field in VFP. I would like a field to
sum two fields in the same record is this possible?. I am useing V6 but will
soon be changing to V8 or 9.

Kind regard,
--

warrenjw
warrenjw@internode.on.net

Re: Calculated Fields by Paul

Paul
Mon Nov 29 20:54:33 CST 2004

Not directly. You can create them in a select statement though:

SELECT qty, price, qty * price AS amount FROM sales

You can do something similar with BROWSE, too.




"warrenjw" <warrenjw@discussions.microsoft.com> wrote in message
news:2CB3CDB5-A460-432E-BFA3-2F1E9A3220C3@microsoft.com...
> Hi
>
> Is it possible to have a calculated field in VFP. I would like a field to
> sum two fields in the same record is this possible?. I am useing V6 but
> will
> soon be changing to V8 or 9.
>
> Kind regard,
> --
>
> warrenjw
> warrenjw@internode.on.net



Re: Calculated Fields by Zeke

Zeke
Tue Nov 30 04:00:26 CST 2004

You can store the formula in a field, and then use the eval() function (or
macro substitution) to retrieve the value.
Ecample:

create cursor CalcTest (formula c(80))
insert into calctest values('"I can " + "use calculated fields"')
select evaluate(formula) from calctest

Zeke


"warrenjw" <warrenjw@discussions.microsoft.com> wrote in message
news:2CB3CDB5-A460-432E-BFA3-2F1E9A3220C3@microsoft.com...
> Hi
>
> Is it possible to have a calculated field in VFP. I would like a field to
> sum two fields in the same record is this possible?. I am useing V6 but
will
> soon be changing to V8 or 9.
>
> Kind regard,
> --
>
> warrenjw
> warrenjw@internode.on.net



Re: Calculated Fields by Anders

Anders
Tue Nov 30 06:04:45 CST 2004

You can have calculated fields for display or reporting purposes in queries,
reports, grids and browse windows. It's not easy to store automatically
calculated fields in tables, and besides it's redundant, error-prone and
totally against the rules and principles of relational data management.
-Anders

"warrenjw" <warrenjw@discussions.microsoft.com> wrote in message
news:2CB3CDB5-A460-432E-BFA3-2F1E9A3220C3@microsoft.com...
> Hi
>
> Is it possible to have a calculated field in VFP. I would like a field to
> sum two fields in the same record is this possible?. I am useing V6 but
will
> soon be changing to V8 or 9.
>
> Kind regard,
> --
>
> warrenjw
> warrenjw@internode.on.net