Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2006
    Posts
    3

    Unanswered: Scrambling Data...

    Hey guys,

    I have a question. I'm pretty new to access and I'm working on a little project. I was wondering how one would go about creating a process to scramble data based on a certain set of user defined preferences.
    For example, in table ABC I want every "A" that appears in the word "Access" in the table to be changed to a "M". (Mccess)
    Also these values don't have to be unscrambled. Just need a process (I.E. Not going in by hand and changing all these by hand) to do this.

    Thanks in advance.-
    Last edited by UF-Supra; 06-02-06 at 12:35.

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Welcome to the forum

    Check out REPLACE() function and UPDATE statement in Access Help (or Google)

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jun 2006
    Posts
    3
    Ok that helped a bit, however I'm still stuck on how to pull out individual letters from the fields. For example:

    Find all fields with the letter a, so it would pick out "apple" "laptop" "label" etc.
    and then replace only the a with another letter such as a k, so it would read "kpple" "lkptop" "lkbel"

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    No need to filter. If you use REPLACE(MyField, "a", "k") it will only change the ones with a in - the others will stay as they were.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ummmm,
    are you going to tell us what you are really trying to do?

    your current example xo make your daxabage qnxo a weap of gwqx geemg a prexxy dumb xwqng xo do
    and there are far more efficient ways to do it.

    izy
    currently using SS 2008R2

  6. #6
    Join Date
    Jun 2006
    Posts
    3
    I've told you what I'm trying to to "really" do...?

    this is the scenario

    tableABC:

    Fruits
    Apple
    Orange
    Grape
    Watermellon



    Scramble Values (For example in the table make "A" = "H")



    tableABC:
    Fruits
    Hpple
    OrHnge
    GrHpe
    WHtermellon


    I'm looking for the best way to go about doing that?

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    excuse me for still feeling that it is a bizarre thing to do!
    i can't imagine the use of 'Hpple' and 'OrHnge' unless you explain it to me.

    if you want to encrypt, hash, or trash your data i might be able to offer suggestions, but 'Hpple' and 'OrHnge' (particularly and) - i'm lost.

    anyhow - it's your application.
    pootle's replace() suggestion covers how to replace all 'a' with 'h' (or perhaps with 'H' since that seems to be the direction you are headed). make sure that the replace() treatment of 'A' vs 'a' conforms with your expectation.

    izy
    currently using SS 2008R2

Posting Permissions

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