My Oracle Support Banner

How To Create View Criteria With Bind Variable (Doc ID 1986675.1)

Last updated on MARCH 15, 2021

Applies to:

Oracle JDeveloper - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Goal

The goal is to create a view criteria with a bind variable and to prevent the user to put a value in this bind variable at runtime.

For example, a requirement may be to create this view criteria : <COLUMN1> >= :<BIND_VARIABLE> and <COLUMN2>='<FIXED_VALUE>', and when :<DYNAMIC_VALUE> is null, get all rows matching the <FIXED_VALUE>.
That can be done in the where clause of the view : (<COLUMN1> >=:<BIND_VARIABLE> or :<BIND_VARIABLE> is null) and <COLUMN2>='<FIXED_VALUE>'. But how to do the 'or :<BIND_VARIABLE> is null' in a view criteria ?

 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.