Dan/Karen:

Hmm, indeed.

Adding "AND LIMIT = 1" to the first block solves the problem for that block:

--JOINER Column Name
  SELECT #1 INTO vWalk_JLINK_COLUMN INDICATOR iv1 +
    FROM Sys_Columns t1 ,  +
         Sys_Tables t2 +
   WHERE t1.Sys_Table_ID = t2.Sys_Table_ID +
     AND t2.Sys_Table_Name = .vWalk_JLINK_TABLE +
     AND LIMIT = 1

That is NOT the solution for the second block, as I need a list of column names returned:

--Capture Column Names for LOJoin_ColumnSET Assembly
  SELECT (LISTOF(#1)) +
    INTO vLOJoin_Column_LIST INDICATOR iv1 +
    FROM Sys_Columns t1, +
         Sys_Tables t2 +
   WHERE t1.Sys_Table_ID = t2.Sys_Table_ID +
     AND t2.Sys_Table_Name = .vLoop101_TABLE

... adding "AND LIMIT = 1" returns only the first column name. Do I first need to do a column count and then set the limit to that? Or is this not the way to snag a list of column names for a table?

Thanks for helping.

Bruce



------ Original Message ------
Sent: 6/28/2016 1:25:49 PM
Subject: RE: [RBASE-L] - ERROR 2038 Referencing Existing Table(s)
From: "Dan Goldberg" <[email protected]>
To: "[email protected]" <[email protected]>
Cc:

Hmm when I run it in 9.5 it says “too many rows returned”, which would make sense since most tables have more than one row?



Dan Goldberg







From: [email protected] [mailto:[email protected]] On Behalf Of Bruce Chitiea
Sent: Tuesday, June 28, 2016 11:06 AM
To: [email protected]
Subject: [RBASE-L] - ERROR 2038 Referencing Existing Table(s)



RBGXE v. 0526 or 0627



Can anyone suggest why an Error #2038 ( -ERROR- #21 is an unidentified table.) ... is thrown by the following code?



--JOINER Column Name
  SELECT #1 INTO vWalk_JLINK_COLUMN INDICATOR iv1 +
    FROM Sys_Columns t1 ,  +
         Sys_Tables t2 +
   WHERE t1.Sys_Table_ID = t2.Sys_Table_ID +
     AND t2.Sys_Table_Name = .vWalk_JLINK_TABLE





TRACE confirms that the temp table referenced in variable vWalk_JLINK_TABLE exists at the time this code runs. BROWSE confirms that the data is correct.



TRACE confirms that the output variable vWalk_JLINK_COLUMN has been populated with the correct value before the error is thrown.



The same dynamic occurs with a subsequent block:



--Capture Column Names for LOJoin_ColumnSET Assembly
  SELECT (LISTOF(#1)) +
    INTO vLOJoin_Column_LIST INDICATOR iv1 +
    FROM Sys_Columns t1,  +
         Sys_Tables t2 +
   WHERE t1.Sys_Table_ID = t2.Sys_Table_ID +
     AND t2.Sys_Table_Name = .vLoop101_TABLE



The referenced table exists prior, and the columnname list is captured into the output variable.



Several blocks of identical code - varying only in their variable assignments - work without issue, before AND after each of these.



This is in code which has worked without modification for over a year.



Thoughts?



Bruce Chitiea

SafeSectors, Inc.

909.238.9012 Mobile





--
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to