Albert, You are correct in my case. Razzak's tax column was computed, and mine was not.
I also realized two things: 1. That the tax should be computed away from the column because when tax rates change your existing invoices are affected if you change the expression. Example: (netamount * .081) 2. In database design one needs to evaluate the expeditiousness of having "columns of the same name" in different tables if the designer would want to update the customer's database in the future. Thanks, Ned -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Albert Berry Sent: Friday, November 04, 2005 12:58 PM To: RBG7-L Mailing List Subject: [RBG7-L] - Re: ERROR: Its type cannot be redefined Is tax computed in either table? If one is computed, the other must also be computed. Ned Ritchie wrote: >The snippet of code below was created by the >"UNLOAD ALL FOR tablename" >from an early 7.1 database. > >When the edited file (to allow for placing the table into RRBYW10) is RUN to >place the table into RRBYW10 I get this error: >ERROR - As column Tax is used in another table, its type cannot be redefined >(2942) >Then when I checked. . .The RRBYW10 table, InvoiceHeader, does indeed have a >column "Tax", BUT its type is also CURRENCY, so I thought: "What's the big >deal here?" > >I quickly renamed the InvoiceHeader "tax" column to "taxx" and temporarily >deleted (+ tax) from the computed column in the table, and proceeded to RUN >the file to install the new table. No errors. > >Now RRBYW10 has my new table "Invoices" with the column "Tax" >And the "InvoiceHeader" table with the column "Taxx" >Both are CURRENCY > >When attempting to rename the column "Taxx" back to "Tax" in the >InvoiceHeader table I get the same error as when I first attempted to run my >UNLOADED file: "ERROR-As column Tax is used in another table, its type >cannot be redefined (2942)" >However, I can add a new column "Tax" with no problem. > >"What is going on here?" > >================================= >CREATE TABLE `Invoices` + >(`Invoice` INTEGER , + > `CustNumber` INTEGER , + > `InvDate` DATE , + > `NetAmt` CURRENCY , + > `TaxCode` INTEGER , + > `Tax` CURRENCY , + > `InvTotal` CURRENCY , + > `AmtPaid` CURRENCY , + > `PaidBy` TEXT (10) ) > > > > >
