on 09-17-2010 3:27 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.