Skip to Content
avatar image
Former Member

Syntax for ora_hash???

BOXI31 SP3 - Oacle 10g

Trying to create an object using Oracle "HASH" function... keep getting ora-00911 invalid character.. appears a syntax issue... I've tried variations, can't get this to work?

ORA_HASH( %1, %2, %3),<table.object>, numeric value, extract(day_of_year from sysdate)

Thoughts?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 20, 2010 at 10:20 PM

    I am not familiar with the function, but after reading a bit of the web I assume that the syntax you would need to use in your universe would be this:

    ORA_HASH(table.column, numeric value, to_char(sysdate,'DDD))

    The to_char() input value of DDD should provide the day of year. That may / may not be functionally equivalent to what you wrote with the "extract" syntax.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Can I ask what you're using this for? I've been away from Oracle for a while (working mostly on DB2 and Teradata) but I used to be almost exclusive to Oracle. I'm wondering what you are hoping to accomplish this this function. Hash functions are a one-way process, so you can encrypt but cannot decrypt the results. For that reason they're often used for passwords. I can take the password you give me, hash it, and compare the results to the stored hash, and that's how I know if you gave me the proper password. But I can't "unhash" the password and tell you what your original password was.

      So I'm curious as to how you intend to use the function, if you can share. 😊