username/password generation with a trigger
Date: 16 Sep 2002 05:37:41 -0700
Message-ID: <617e9c3f.0209160437.a286a10_at_posting.google.com>
Hello,
I'm a total newbie when it comes to (Oracle) databases, so I was
wondering if someone could help me out with a problem.
I have developed a web-based JSP application. This website uses a
login-system based on a username/password pair in the database. In
short, I have one table called 'customer' which is linked to another
one 'site_customer'. In the latter one, there are two fields,
username/password.
The customer table also contains a first,- and last name as you can
see. Now, here comes the problem: I want to generate a username based
on these names (e.g. 'john smith' would result in 'jsmithxxxx', where
xxxx is an incremeting number (if there is a 'jonathan smith' or
something))
How on earth can I do this? I tried to read something about triggers
that would generate a new record for the site_customer table. I'm
kinda stuck with this. Also: how do I generate a random
password/string .. ?
Any help would be greatly appreciated,
Rens van Leeuwen
Received on Mon Sep 16 2002 - 14:37:41 CEST
customer.firstname
customer.lastname
customer.customer_num -> site_customer.customer_num
site_customer.username
site_customer.password