Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2011
    Posts
    34

    Smile Unanswered: Search and Trim column

    Hi Guys,

    I have a column that I need to trim all the characters to the left and including 'cnm='

    hsttp://websitedata.ca/junk-chars/more-junk.jsp?src=ppc&cnm=keep-these-chars-here

    help please
    - Using Oracle 11g with Toad v12

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Try:
    Code:
    SQL> VAR Url VARCHAR2(1000);
    SQL> EXEC :url:='https://websitedata.ca/junk-chars/more-junk.jsp?src=ppc&cnm=keep-these-chars-here';
    
    SQL> SELECT SUBSTR ( :Url, INSTR ( :Url, '=', -1) + 1) FROM DUAL;
    
    SUBSTR(:URL,INSTR(:URL,'=',-1)+1)
    ------------------------------------------
    keep-these-chars-here
    Last edited by LKBrwn_DBA; 04-08-14 at 14:50.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Aug 2011
    Posts
    34
    Thank you so much!!
    - Using Oracle 11g with Toad v12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •