Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    7

    Unanswered: SQL to mask a DB2 table column?

    Can some one please give me a SQL to get a DB2 column (Like SSN) with some random number or masked with some characters like XXXXXXXXX.

    Thanks.

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

    Cool


    Create a view like:
    Code:
    Create Or Replace VIEW MyTable_VW
    As
    Select Col1, Col2, 'XXX-XX-'||SUBSTR(SSN,-4), Coln...
      From MyTable;
    And Revoke all privileges on the table from the Users.

    Last edited by LKBrwn_DBA; 02-07-06 at 16:42.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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