I'm not able to figure out this issue its on power builder code. I'm fetching a where clause and storing in a string variable and I'm trying to remove the last five characters i.e OR ". I'm using the below function but it is not working in Power Builder in ODBC connection but working in sybase connection. Any help is highly appreciated ? Thanks
szClause= "fd_M.fd_term_date is null AND (fd_M.fd_incom_est_yn = 'Y' OR (EXISTS (SELECT * FROM fd_M f WHERE fd_M.fd_ref_fund = f.fd_id AND f.fd_incom_est_yn = 'Y'))) AND (Upper(fd_M.fd_reprt_c3)='4HSJ' OR "
szClause= Left(sClause, Len(sClause) - 5)