select c_bpartner.name , c_bpartner.c_bpartner_id from c_bpartner where name in (select ad_org.name from ad_org where name='orgnamehere' ) the error is on the select in the sub query, im doing this query using postgresql and on jaspersoft studio. Thank you for the help