Hi, How to write this in Torque --------------------------------------------------------------------------------------------------------- select b.drawing_id from product a , drawing b where a.product_code = 'P001' and trim(b.drawing_code) = trim (a.drawing_code) and b.product_id = a.product_id; --------------------------------------------------------------------------------------------------------- I am interested in the trim part used in join. Regards John