3 Replies Latest reply on Aug 27, 2013 1:34 PM by 3e68b26b-bb14-4a01-aa09-9a07741a91cf

    Having troubles with Replace and TRIM

    3e68b26b-bb14-4a01-aa09-9a07741a91cf

      Guys,

       

        im trying to take out all the spaces in a string but im having toubles, cause i used like, trim, ltrim, replace and nothing works, i will post the last time that ive tryed and the result

       

      SELECT DISTINCT(REPLACE(REPLACE(REPLACE(REPLACE(ltrim(rtrim(CD_FISC, ' '),' '),'Pre',' '), 'Preço',''), ' ',''), '.','')) FROM TEMP_ESTQ

      AND STILL RETURNING WITH THIS DAMN SPACES LIKE THIS " 85444200" BUT I WANT THIS "85444200" WITHOUT FREAKING SPACES