I would do it with a trigger.
 
Troy
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Chuck Lockwood
Sent: Wednesday, December 31, 2003 2:52 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Storing an _expression_ in a column

I have two tables, Products and PriceCodes.  The PriceCode table will define the ServiceCharge for the Products, based on an _expression_ stored in the table.

Can this be done on the fly, can I force a view to use the _expression_, or do I need to compute and store the resulting values via triggers?  (This is an R:Tango application)

 

Two tables:

Table 1: Products

PriceCode                     1

RebateToUs                  0

BasePrice                     100

 

Table 2: PriceCodes

            PriceCode                     1

OurServiceCharge          .06

            ServiceChargeRule         (IFGT(RebateToUs,0,0,(BasePrice*OurServiceCharge)))

 

Options?

 

Thanks, and Happy New Year!

Chuck Lockwood
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LockData Technologies, Inc.                 
309 Main Avenue, Hawley, Pa 18428         
570-226-7340 ~ Fax: 570-226-7341   
[EMAIL PROTECTED] ~ www.lockdata.com                  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

 

Reply via email to