In C# I can generate random number from a string like this:
public string CreateRandomNumber(string normal)
{
string abnormal = (new Random(normal.GetHashCode())).Next().ToString();
return abnormal;
}
But I want to do the same (kind of) operation inside the oracle database. So, how can I generate a random number from a string ?
The DBMS_RANDOM package provides a built-in random number generator.
Using the
SEED Procedures, you can pass a
VARCHAR2as theseed, so you can skip the hash generation step.