Friday, June 05, 2015

How to create Parameterzied View?

Here is the simplest way to create Parameterzied view.

CREATE OR REPLACE VIEW xxdd_mtl_serial_numbers
AS
SELECT *
FROM mtl_serial_numbers
WHERE serial_number in ( USERENV ('client_info'));

exec dbms_application_info.set_client_info('49236920');


select * from xxdd_mtl_serial_numbers