I have multiple rows where Column A is the same. I want to copy those
while changing the value of column A to some constant. For example

Insert into mytable (ColA, ColB, ColC)
Select 'NewConstant', ColB, ColC
from mytable
where ColA='OldValue')

But I am getting:
SQL State: 42703
Vendor Code: -206
Message: [SQL0206] Column or global variable "ANORDER@xxxxxxxxxxxxx" not
found. Cause . . . . . : "ANORDER@xxxxxxxxxxxxx" was not found as a
column of table *N in *N and was not found as a global variable in *N. If
the table is *N, "ANORDER@xxxxxxxxxxxxx" is not a column of any table or
view that can be referenced. Recovery . . . : Do one of the following
and try the request again: -- Ensure that the column and table names are
specified correctly in the statement. -- If this is a SELECT statement,
ensure that all the required tables were named in the FROM clause. -- If
the column was intended to be a correlated reference, qualify the column
with the correct table designator. -- If the column was intended to be a
global variable, qualify the name with the schema where the global
variable exists or ensure the schema is in the path.

Rob Berendt

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2020 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].