Hello CR god's, Im new to SQl commands can you help me out on this error.
My SQl Command Looks Like this
SELECT KEY_REPRESENTATION
, CAST(SUBSTRING(KEY_REPRESENTATION, charindex('=',KEY_REPRESENTATION)+1, LEN (KEY_REPRESENTATION) -
charindex('=',KEY_REPRESENTATION)+1) as BIGINT) as aud_addr_id
, FOCUS_TELLER_ID
, ACTIVITY_ID
, OPERATOR_NAME
, TABLE_NAME
, ADDTIMESTAMP
, COLUMN_NAME
, LAST_NAME
, FIRST_NAME
, TIN
, BEFORE_REPRESENTATION
, AFTER_REPRESENTATION
from db2inst1.DATAAUDIT,db2inst1 .OPERATOR,db2inst1.INDIVIDUAL,db2inst1.ADDRESS,db2inst1.INDIVIDUALADDRESS
Where ADDRESS.ADDRESS_ID = INDIVIDUALADDRESS.ADDRESS_ID
and INDIVIDUALADDRESS.INDIVIDUAL_ID = INDIVIDUAL.INDIVIDUAL_ID
and DATAAUDIT.FOCUS_TELLER_ID = OPERATOR.OPR_NBR
and CAST(SUBSTRING(KEY_REPRESENTATION, charindex('=',KEY_REPRESENTATION)+1, LEN (KEY_REPRESENTATION) -
charindex('=',KEY_REPRESENTATION)+1) as BIGINT) = ADDRESS.ADDRESS_ID
and TABLE_NAME = 'ADDRESS'
and BEFORE_REPRESENTATION is not null
and AFTER_REPRESENTATION is not null
and COLUMN_NAME not in ('LASTUPDATEDATE','LASTUPDATEBY')
I keep getting this ERROR:
"ADDRESS.ADDRESS_ID" is not Valid in the Context where it is used. SQLSTATE=42703 {Database Vendor Code: -206