how to get Left outer join records of a table

Shankar19
ServiceNow Employee
ServiceNow Employee

Hi Team,

I have two tables, I want to get the uncommon(unmatched) records from one table.

Table A, two columns or more
P1   S1
P2   S2
P3   S3


Table B, one column or more
S1
S2
S3
S4
S5

 

I want to get the uncommon(unmatched) records from Table B. (I dont want go through each record of Table B and look for Table A's record, its gives O(n) time. Looking for lesser time approach)

S4
S5

 

 

3 REPLIES 3

Yousaf
Giga Sage

Hi Shankar,

Please go through this doc:

Example left join in creating a database view

 

Mark Correct or Helpful if it helps.


***Mark Correct or Helpful if it helps.***

If I answered your query can you mark my answer correct or helpful and close the thread


***Mark Correct or Helpful if it helps.***

-O-
Kilo Patron
Kilo Patron

In case Table A has a reference to Table B you could select from Table B and use RLQUERY encoded query operator to only select those record where there is not corresponding record in Table A (records that reference Table B).