DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: clean up database

  1. #1
    Join Date
    May 2005
    Location
    Boracay
    Posts
    681

    clean up database

    Hi Friends,

    I want to clean-up my EMP table with some garbage encoded by the users.
    One of the affected column is ENAME. I found garbage values like

    ENAME
    --------
    AAAAAA
    BBBBBBB
    CCCCCC

    I want to update this field to null if a certain letter repeated 3x or more
    starting from position 1. Can you help me please.

    Another thing is, how do I check if ENAME contains any small case letters?
    For example.

    ENAME
    -------
    JENnY LOPeZ


    Thanks a lot
    Last edited by yxez; 09-23-2007 at 09:00 PM.
    Behind The Success And Failure Of A Man Is A Woman

  2. #2
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Lightbulb



    For 3 or more letters:

    Code:
    Where SUBTR(ENAME,1,1) = SUBTR(ENAME,2,1)
      And SUBTR(ENAME,1,1) = SUBTR(ENAME,3,1)
    For Mixed case letters:

    Code:
    Where ENAME != UPPER(ENAME)


    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  3. #3
    Join Date
    May 2005
    Location
    Boracay
    Posts
    681
    Thanks a lot dear ....I just feel God's love everyday to hear helping people like you, Praise HIM and more blessing to all and more power to this forum.
    Behind The Success And Failure Of A Man Is A Woman

Posting Permissions

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


Click Here to Expand Forum to Full Width