0 Replies Latest reply: Sep 16, 2016 5:09 AM by Victor Salling RSS

    Display 1 if value is in another table column

      Hi everyone !


      I'm working with qliksense on a PotstgreSQL database and I have two tables "public"."bookings" and "public"."quotes".

      Some of the IDs of the first table are in a column "deal_id" of the second one.

      I would like to load a table that will display the whole "public"."bookings" table, plus a column that will display 1 if "public".bookings"."id" is in the column "public"."quotes"."deal_id", and 0 if not.

      Is it possible ? I have tried everything with the functions IF and EXISTS, and by combining them, etc...

      Thanks in advance for your help !