At 04:40 PM 6/27/2012, Bruce Chitiea wrote:

I receive the error message: 'pksid is an undefined table (2059)' when I run the following:

   UPDATE pksimport SET t1.pksid = t2.pksid +

   FROM pksimport t1, pksurveytest t2 +

   WHERE t2.pksdate = t1.pksdate AND +

   t2.pkstime = t1.pkstime

Tables 'pksimport' and 'pksurveytest' exist.

Column 'pksid' exists in both tables; holding values in pksurveytest and initially null in pksimport.


Bruce,

Without knowing all details, here's a snippet of my code that will perform a correlational UPDATE in
R:BASE.

-- Example 01 (Using R:BASE eXtreme 9.5 Sample RRBYW18 Database)

IF (CVAL('DATABASE')) <> 'RRBYW18' OR (CVAL('DATABASE')) IS NULL THEN
   CONNECT RRBYW18 IDENTIFIED BY NONE
ENDIF
   CLS
   SET ERROR MESSAGE 677 OFF
   DROP VIEW tDetail_Totals
   SET ERROR MESSAGE 677 ON
   CREATE TEMPORARY VIEW `tDetail_Totals` +
   (`TransID`,`Tot_ExtPrice`) +
   AS SELECT TransID,(SUM(ExtPrice)) +
   FROM InvoiceDetail GROUP BY TransID
   COMMENT ON VIEW `tDetail_Totals` IS 'TEMP View to get totals'
   SET FEEDBACK ON
   UPDATE InvoiceHeader SET NetAmount = Tot_ExtPrice +
   FROM tDetail_Totals,InvoiceHeader +
   WHERE InvoiceHeader.TransID = tDetail_Totals.TransID
   SET FEEDBACK OFF
   CLS
   RETURN

Hope that helps!

Very Best R:egards,

Razzak

Reply via email to