ERROR: Non existent argument reference (arg 1): ELSE %i1 END) INNER JOIN products_type_language ptl ON ptl.productsType_id=p.productType_id AND ptl.language_id = (CASE WHEN (SELECT COUNT(*) FROM products_type_language WHERE productsType_id=p.productType_id AND language_id=%i0) > 0 THEN %i0 ELSE %i1 END) WHERE %l0