Hi

One other way of doing this would be creating a view.

select username ,expiry_date
from your apps_user_table
unionall
select username ,expiry_date
from user_users


Then your application code would query this view and check if the password has expied for that user if so display the appropriate eror message.

regards
Hrishy