Dennis:

So if I'm reading you right, 'pksimport T0' and 'pksimport T1' are two INSTANCES of the SAME table: 'Instance T0' being the target of the update, and 'Instance T1' being the source of correlation values.

Is this notion of 'instancing' accurate?

Bruce
-------- Original Message --------
Subject: [RBASE-L] - RE: 'Undefined Table' error
From: Dennis McGrath <[email protected]>
Date: Wed, June 27, 2012 2:07 pm
To: [email protected] (RBASE-L Mailing List)

Bruce,
 
It would be better to understand what is happening.
You are using two versions of the same table.
The first has no alias, the second does.
You can’t say
UPDATE pksimport SET t1.pksid = whatever
because the column t1.pksid is not in that copy of the table.
 
This syntax gives you a better idea what is happening:
 
   UPDATE pksimport T0 SET t0.pksid = t2.pksid +

   FROM pksimport t1, pksurveytest t2 +

   WHERE t2.pksdate = t1.pksdate AND +
 
   t2.pkstime = t1.pkstime
 
 
 
 
Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
From: [email protected] [mailto:[email protected]] On Behalf Of Bruce Chitiea
Sent: Wednesday, June 27, 2012 4:01 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: 'Undefined Table' error
 
Huh. That got it.
 
Would this then be an accurate statement of a general rule:
 
'Omit the table alias from the left-hand side of of a two-table equality'?
 
Thanks much, Lena
 
Bruce
 
 
-------- Original Message --------
Subject: [RBASE-L] - RE: 'Undefined Table' error
From: Lena Dammstrom <[email protected]>
Date: Wed, June 27, 2012 1:51 pm
To: [email protected] (RBASE-L Mailing List)
Try removing the T1.
UPDATE pksimport SET pksid = t2.pksid
 
From: [email protected] [mailto:[email protected]] On Behalf Of Bruce Chitiea
Sent: Wednesday, June 27, 2012 3:40 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - 'Undefined Table' error
 
All:
 
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

Reply via email to