How to run a View with parameters
Hi guys,
I have a view which has to take the USERNAME of the current user connected to the database as a parameter:
Create or Replace View XYZ(A1,A2,A3)
AS Select AA1, AA2, AA3
from X1, X2
where ...
and X1.id_valid in (select XX3.id_valid
from X3 XX3
where XX3.ID_VALID = X1.id_valid
and XX3.username = USERNAME1 )
Where USERNAME1 is the database user connected to it!.
Could you give me a hand please?