Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: HELP WITH MY SQL COMMAND Post Reply Post New Topic
Author Message
skreczko
Newbie
Newbie


Joined: 18 Oct 2010
Online Status: Offline
Posts: 7
Quote skreczko Replybullet Topic: HELP WITH MY SQL COMMAND
    Posted: 11 Apr 2011 at 10:57am

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

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.008 seconds.