-- List Users with Active Licenses
spool c:\active_deliver_users_yyyymmdd.txt
set linesize 1000
select nu.first_name "First Name", nu.last_name "Last Name",
np.product_name "Product Name", np.license_name "License Name", np.product_key "License Id"
from KNTA_USERS nu, KNTA_USER_PRODUCTS nup, KNTA_PRODUCTS np
where nu.end_date is null
-- and nup.product_id in ( 1,6 ) /* 1=Deliver Power 6=Deliver Standard */
and nu.user_id = nup.user_id
and np.product_id = nup.product_id
order by np.product_name, nu.first_name
spool off
|