Jim,
By way of Info. The Ctotals column in you view may be typed as "NOTE" rather than Double or real (result of the SUM calculation). When RBase creates a view with a computed column the program often assigns a "NOTE" data type rather than the data tipe you expect. In addition you may need to do a data conversion to currency in the insert statement.
--
Jim Bentley
American Celiac Society
PO Box 23455
New Orleans LA 70183-0455
email: [EMAIL PROTECTED] Phone: 504-737-3293
-----Original Message----- From: Jim Limburg <[EMAIL PROTECTED]> Sent: Tue, 08 Jun 2004 16:34:01 -0400 To: [EMAIL PROTECTED] (RBASE-L Mailing List) Subject: [RBASE-L] - Re: Update -- NOT
Further Definition of problem..
The View is being created alright. It's the update statement that gives me the error that the Syntax is incorrect for the command.
Jim
Jim Limburg wrote:
Could someone fill me in on what I'm doing wrong here..
DROP VIEW invsmrize CREATE VIEW invsmrize (category, ctotals ) + AS SELECT category, SUM(cy_unit_cost * quantity) FROM tmdinv + GROUP BY category
UPDATE lycopy03 SET totalamt = (T2.ctotals) FROM tmdinv T1, invsmrize T2 +
WHERE T1.category = T2.category
I am creating the view above to gather some totals, and then I just want to update a column in a table with the results. The lycopy03 table has just two columns Category (Text 15) and totalamt which is currency. The tmdinv table has several columns but the Category is Text 15, the cy_unit_cost is double and the quantity is real. In my view I get some ugly results, and I'm wondering if this is the culprit here.
Any help appreciated.
Jim Limburg

