data is matched but the query return data nevertheless all data is matched

Database
ah
Teradata Employee

data is matched but the query return data nevertheless all data is matched

I have the below query to find unmatched data for 2 columns  between 2 tables :

sel prty_id,edw_key from gdev1t_stg.table 1 tl1

inner join gdev1t_base.prty prt

on tl1.edw_key=prt.prty_id

where tl1.edw_key<>prt.prty_id

---the returned data is equal and the datatype of both columns are integer ,what should be the solution for this query,I have tried to use trim function but the result is the same ,data are equal from the previous query although I putting <> condition in the query

1 REPLY
Junior Contributor

Re: data is matched but the query return data nevertheless all data is matched

I don't understand what you're trying to do,

t1.edw_key can't be both equal and not equal to prt.prty_id in the same row:

   tl1.edw_key= prt.prty_id
   tl1.edw_key<>prt.prty_id