5 Replies Latest reply: Mar 20, 2014 12:28 PM by Kristof Jacobs RSS

    Where not exists Client_ID in a specific table

    Kristof Jacobs

      Hi

       

      I need to find a Client_ID from table X that didn't exist in table B.

       

      My problem is that all Client_IDs are already loaded in table A.

       

      If I use a where not exists (Client_ID) than it will delete everyone in table X, which I don't want.
      Or can I use a where not exists where it will check for the Client_ID in a specific table?

       

      example:

      Table A has all Client_IDs
      Table B has some Clients
      Table X has some Client_ID but I want the one who isn't in Table B
      Table Y is my new table with only Client_ID 4

       

      Table ATable BTable XTable Y
      Client_IDClient_IDClient_IDClient_ID
      111
      22
      33
      444

       

      thanks in advance